From c9c72023d15decebe700ad0bfe3e8cbac9a85248 Mon Sep 17 00:00:00 2001 From: Michael Andreen Date: Wed, 18 May 2005 16:04:25 +0000 Subject: [PATCH] small change --- input.txt | 2 +- node.cpp | 6 +++--- node.h | 2 +- planner.cpp | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/input.txt b/input.txt index 9bfc0c0..26792d3 100644 --- a/input.txt +++ b/input.txt @@ -9,7 +9,7 @@ httpd.sh #32 #dasdssad eth0 -"1" +A # test "ifconfig up eth0" 0: NET # kommentar diff --git a/node.cpp b/node.cpp index 9bedf38..1efdf6a 100644 --- a/node.cpp +++ b/node.cpp @@ -34,11 +34,11 @@ const Literals& Node::effects() const{ return _effects; } -void Node::execute(bool strict, const Literals& effects){ +void Node::execute(const Literals& effects){ for (Literals::const_iterator effect = effects.begin(); effect != effects.end(); ++effect){ _preconditions.erase(_preconditions.find(*effect)); } - if ((_preconditions.size() != 0 && strict) || _executed) + if ((_preconditions.size() != 0) || _executed) return; if (_preconditions.size() != 0){ @@ -53,7 +53,7 @@ void Node::execute(bool strict, const Literals& effects){ _effects = _action.effects(value); for(vector::iterator child = _children.begin(); child != _children.end(); ++child){ - (*child)->execute(strict,effects); + (*child)->execute(effects); } } diff --git a/node.h b/node.h index 28a8287..b49d010 100644 --- a/node.h +++ b/node.h @@ -14,7 +14,7 @@ class Node { virtual ~Node(){} void addChild(Node* node); const Action& action() const; - void execute(bool strict, const Literals& effects); + void execute(const Literals& effects); bool executed() const; const Literals& effects() const; diff --git a/planner.cpp b/planner.cpp index 884567d..d49fb91 100644 --- a/planner.cpp +++ b/planner.cpp @@ -82,9 +82,9 @@ void Planner::addNode(Node* node){ void Planner::execute(){ - _start->execute(true,Literals()); + _start->execute(Literals()); /*for (hash_map::iterator node = _addedNodes.begin(); node != _addedNodes.end(); ++node){ if (node->second->executed()){ }*/ - _start->execute(false,Literals()); + _start->execute(Literals()); } -- 2.39.2