Mercurial > hg > match-vamp
diff src/Finder.cpp @ 183:24ddab06aace re-minimise
Toward allowing types to be small again. Doesn't currently build
author | Chris Cannam |
---|---|
date | Thu, 19 Feb 2015 17:17:20 +0000 |
parents | a67663dc698d |
children | 487261a22b18 |
line wrap: on
line diff
--- a/src/Finder.cpp Thu Feb 19 16:57:19 2015 +0000 +++ b/src/Finder.cpp Thu Feb 19 17:17:20 2015 +0000 @@ -190,7 +190,8 @@ pathcost_t min = -1; if ((c > prevRowStart) && (c <= prevRowStop)) { // diagonal from (r-1,c-1) - min = m_m->getPathCost(r-1, c-1) + newStep * diagonalWeight; + min = m_m->getPathCost(r-1, c-1) + + distance_t(newStep * diagonalWeight); dir = AdvanceBoth; } if ((c >= prevRowStart) && (c < prevRowStop)) { @@ -253,16 +254,16 @@ for (int c = rowStart; c < rowStop; c++) { distance_t newStep = m_m->getDistance(r, c); - pathcost_t updateTo = -1.0; + pathcost_t updateTo = InvalidPathCost; advance_t dir = AdvanceNone; if (r > r1) { // not first row pathcost_t min = -1; if ((c > prevRowStart) && (c <= prevRowStop)) { // diagonal from (r-1,c-1) - min = m_m->getPathCost(r-1, c-1) + newStep * diagonalWeight; + min = m_m->getPathCost(r-1, c-1) + distance_t(newStep * diagonalWeight); err.prevCost = m_m->getPathCost(r-1, c-1); - err.distance = newStep * diagonalWeight; + err.distance = distance_t(newStep * diagonalWeight); dir = AdvanceBoth; } if ((c >= prevRowStart) && (c < prevRowStop)) {