# HG changeset patch # User Chris Cannam # Date 1415864701 0 # Node ID 333832a6ee5e2dc49ad3ce92b26fe0753375612b # Parent 37c0b59fd5141248abd7443f9c89dba5afd1657d Some (commented-out) debug diff -r 37c0b59fd514 -r 333832a6ee5e Finder.cpp --- a/Finder.cpp Fri Oct 31 16:36:19 2014 +0000 +++ b/Finder.cpp Thu Nov 13 07:45:01 2014 +0000 @@ -257,16 +257,33 @@ while (find(y, x) && ((x > 0) || (y > 0))) { +// cerr << "x = " << x << ", y = " << y; + pathx.push_back(x); pathy.push_back(y); switch (getDistance() & ADVANCE_BOTH) { - case ADVANCE_THIS: y--; break; - case ADVANCE_OTHER: x--; break; - case ADVANCE_BOTH: x--; y--; break; + case ADVANCE_THIS: +// cerr << ", going down (dist = " << (int)getDistance() << ")" << endl; + y--; + break; + case ADVANCE_OTHER: +// cerr << ", going left (dist = " << (int)getDistance() << ")" << endl; + x--; + break; + case ADVANCE_BOTH: +// cerr << ", going diag (dist = " << (int)getDistance() << ")" << endl; + x--; + y--; + break; default: // this would indicate a bug, but we wouldn't want to hang - cerr << "WARNING: Neither matcher advanced in path backtrack at (" << x << "," << y << ")" << endl; - if (x > y) x--; else y--; break; +// cerr << "WARNING: Neither matcher advanced in path backtrack at (" << x << "," << y << ")" << endl; + if (x > y) { + x--; + } else { + y--; + } + break; } }