From c4dac6829d93aade3b0aa271d0157d8a4e06d2c5 Mon Sep 17 00:00:00 2001 From: Michael Andreen Date: Thu, 9 Jun 2005 14:22:33 +0000 Subject: [PATCH] no point in continuing if there are no more preconditions to satisfy --- planner.cpp | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.39.2