From: Michael Andreen Date: Thu, 9 Jun 2005 14:22:33 +0000 (+0000) Subject: no point in continuing if there are no more preconditions to satisfy X-Git-Url: https://ruin.nu/git/?p=popboot.git;a=commitdiff_plain;h=c4dac6829d93aade3b0aa271d0157d8a4e06d2c5 no point in continuing if there are no more preconditions to satisfy --- diff --git a/planner.cpp b/planner.cpp index 9d84570..94d0549 100644 --- a/planner.cpp +++ b/planner.cpp @@ -194,6 +194,9 @@ int Planner::cleanupExecution(){ _goal.push_back(precond->first); } + if (goal.size() == 0) + exit(0); + cout << "Unsatisfied preconditions so far: " << _goal.size() << ": "; copy(_goal.begin(), _goal.end(), ostream_iterator(cout, " ")); cout << endl;