diff options
author | Nicola Mettifogo | 2007-04-07 12:04:27 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-04-07 12:04:27 +0000 |
commit | 17bcfbf89dc582bae49ed2890b56a729f64213f0 (patch) | |
tree | 6b795cc306bf35a967eb170e42f370d9e25c4f76 | |
parent | 1e1ba32c0a30a82ca41b10538e26ee10fa5709de (diff) | |
download | scummvm-rg350-17bcfbf89dc582bae49ed2890b56a729f64213f0.tar.gz scummvm-rg350-17bcfbf89dc582bae49ed2890b56a729f64213f0.tar.bz2 scummvm-rg350-17bcfbf89dc582bae49ed2890b56a729f64213f0.zip |
Added code for ~Command().
svn-id: r26402
-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 |