From 21ded6679fbbc73f364590de4fee16bbb9f95244 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Wed, 1 Sep 2010 04:42:10 +0000 Subject: [PATCH] - some code cleanup for multi-build debug --- source/glest_game/type_instances/unit.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/glest_game/type_instances/unit.cpp b/source/glest_game/type_instances/unit.cpp index e7bd09b3..58400856 100644 --- a/source/glest_game/type_instances/unit.cpp +++ b/source/glest_game/type_instances/unit.cpp @@ -648,6 +648,7 @@ Command *Unit::getCurrCommand() const{ void Unit::replaceCurrCommand(Command *cmd) { assert(!commands.empty()); commands.front() = cmd; + this->setCurrentUnitTitle(""); } //returns the size of the commands @@ -1308,7 +1309,8 @@ void Unit::updateTarget(){ } } -void Unit::clearCommands(){ +void Unit::clearCommands() { + this->setCurrentUnitTitle(""); while(!commands.empty()){ undoCommand(commands.back()); delete commands.back(); @@ -1316,7 +1318,7 @@ void Unit::clearCommands(){ } } -CommandResult Unit::checkCommand(Command *command) const{ +CommandResult Unit::checkCommand(Command *command) const { SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); @@ -1474,6 +1476,7 @@ CommandResult Unit::undoCommand(Command *command){ } retryCurrCommandCount=0; + this->setCurrentUnitTitle(""); return crSuccess; }