From 699784864532e9f271f96815f75ee9acf6b33dc4 Mon Sep 17 00:00:00 2001 From: dhewg Date: Thu, 22 Dec 2011 11:48:53 +0100 Subject: [PATCH] Use HUGE_VAL instead of HUGE This is more portable, and older MinGW versions actually don't know about HUGE. Reported by serpentine. --- neo/tools/compilers/roqvq/codec.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/neo/tools/compilers/roqvq/codec.cpp b/neo/tools/compilers/roqvq/codec.cpp index 9174e608..344232f6 100644 --- a/neo/tools/compilers/roqvq/codec.cpp +++ b/neo/tools/compilers/roqvq/codec.cpp @@ -322,7 +322,7 @@ void codec::Segment( int *alist, float *flist, int numElements, float rmse) int codec::BestCodeword( unsigned char *tempvector, int dimension, VQDATA **codebook ) { VQDATA dist; - VQDATA bestDist = HUGE; + VQDATA bestDist = HUGE_VAL; VQDATA tempvq[64]; int bestIndex = -1; @@ -1505,7 +1505,7 @@ void codec::VQ( const int numEntries, const int dimension, const unsigned char * // // find the closest two and eliminate one // - double bestDist = HUGE; + double bestDist = HUGE_VAL; double dist, simport; int bestIndex = -1; int bestOtherIndex = 0; @@ -1571,7 +1571,7 @@ void codec::VQ( const int numEntries, const int dimension, const unsigned char * // until we have reduced it to 256 entries, find one to toss // do { - bestDist = HUGE; + bestDist = HUGE_VAL; bestIndex = -1; bestOtherIndex = -1; if (optimize) { @@ -1586,7 +1586,7 @@ void codec::VQ( const int numEntries, const int dimension, const unsigned char * } } if (bestIndex == -1 || !optimize) { - bestDist = HUGE; + bestDist = HUGE_VAL; bestIndex = -1; bestOtherIndex = 0; aentries = 0;