diff --git a/src/problem/problem.cpp b/src/problem/problem.cpp index 194866e7eeda1c48285cefd9413438b7bd32ce34..5d4459d16d257fd4a09733a74d777ff0c310a73f 100644 --- a/src/problem/problem.cpp +++ b/src/problem/problem.cpp @@ -1620,11 +1620,6 @@ bool Problem::check(int verbose_level) const if (verbose_level > 0) cout << " c" << c->id() << " @ " << c.get(); - auto Fo = c->getFrameOther(); - auto Co = c->getCaptureOther(); - auto fo = c->getFeatureOther(); - auto Lo = c->getLandmarkOther(); - if ( c->getFrameOtherList() .empty() && c->getCaptureOtherList() .empty() && c->getFeatureOtherList() .empty() @@ -1778,16 +1773,18 @@ bool Problem::check(int verbose_level) const found = found || found_here; } + // find in constrained Frame + auto Fo = c->getFrameOther(); if (Fo){ sb_vec = Fo->getStateBlockVec(); found_here = (std::find(sb_vec.begin(), sb_vec.end(), sb) != sb_vec.end()); if (found_here && verbose_level > 0) cout << " Fo" << Fo->id(); found = found || found_here; - } // find in constrained Capture + auto Co = c->getCaptureOther(); if (Co) { sb_vec = Co->getStateBlockVec(); @@ -1807,6 +1804,7 @@ bool Problem::check(int verbose_level) const } // find in constrained Feature + auto fo = c->getFeatureOther(); if (fo) { // find in constrained feature's Frame @@ -1832,6 +1830,7 @@ bool Problem::check(int verbose_level) const } // find in constrained landmark + auto Lo = c->getLandmarkOther(); if (Lo) { sb_vec = Lo->getStateBlockVec();