# HG changeset patch # User Chris Cannam # Date 1416331237 0 # Node ID a130ec8e5eef2c5cecafb404082a28dd509ade1b # Parent 696f6e7f2f31ed52012613ebf0269fd2c6de030e Minor float fixes diff -r 696f6e7f2f31 -r a130ec8e5eef src/Finder.cpp --- a/src/Finder.cpp Tue Nov 18 16:35:15 2014 +0000 +++ b/src/Finder.cpp Tue Nov 18 17:20:37 2014 +0000 @@ -249,15 +249,15 @@ // vertical from (r-1,c) double cost = pm1->m_bestPathCost[r-1][c-pm1->m_first[r-1]] + newCost; - if ((min == -1) || (cost < min)) { + if ((min < 0) || (cost < min)) { min = cost; dir = Matcher::AdvanceThis; } } if (c > thisRowStart) { // horizontal from (r,c-1) - double cost =pm1->m_bestPathCost[r][i2-1]+newCost; - if ((min == -1) || (cost < min)) { + double cost = pm1->m_bestPathCost[r][i2-1]+newCost; + if ((min < 0) || (cost < min)) { min = cost; dir = Matcher::AdvanceOther; } @@ -326,15 +326,15 @@ switch (getAdvance()) { case Matcher::AdvanceThis: -// cerr << ", going down (dist = " << (int)getDistance() << ")" << endl; +// cerr << ", going down (dist = " << getDistance() << ")" << endl; y--; break; case Matcher::AdvanceOther: -// cerr << ", going left (dist = " << (int)getDistance() << ")" << endl; +// cerr << ", going left (dist = " << getDistance() << ")" << endl; x--; break; case Matcher::AdvanceBoth: -// cerr << ", going diag (dist = " << (int)getDistance() << ")" << endl; +// cerr << ", going diag (dist = " << getDistance() << ")" << endl; x--; y--; break;