diff options
-rw-r--r-- | engines/parallaction/commands.cpp | 15 | ||||
-rw-r--r-- | engines/parallaction/commands.h | 11 |
2 files changed, 14 insertions, 12 deletions
diff --git a/engines/parallaction/commands.cpp b/engines/parallaction/commands.cpp index 095816d3b7..66e60c16e8 100644 --- a/engines/parallaction/commands.cpp +++ b/engines/parallaction/commands.cpp @@ -199,10 +199,7 @@ void Parallaction::freeCommands(Command *list) { while (cmd) { Command *v4 = (Command*)cmd->_next; - - if (cmd->_id == CMD_LOCATION) free(cmd->u._string); delete cmd; - cmd = v4; } @@ -348,6 +345,18 @@ void Parallaction::runCommands(Command *list, Zone *z) { } +Command::Command() { + _id = 0; + _flagsOn = 0; + _flagsOff = 0; +} + +Command::~Command() { + + if (_id == CMD_LOCATION) free(u._string); + +} + } // namespace Parallaction diff --git a/engines/parallaction/commands.h b/engines/parallaction/commands.h index 5070aef2e9..1278cdcc9b 100644 --- a/engines/parallaction/commands.h +++ b/engines/parallaction/commands.h @@ -68,15 +68,8 @@ struct Command : public Node { uint32 _flagsOn; uint32 _flagsOff; - Command() { - _id = 0; - _flagsOn = 0; - _flagsOff = 0; - } - - ~Command() { - - } + Command(); + ~Command(); }; } // namespace Parallaction |