X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fmisc%2Fcommands.cxx;h=88869848f7e45fea7c84a07784cbc30c7d75a100;hb=5178f69f1847f91832a97f8b6989e826213d82b2;hp=0b471651590d20068d376b46b35987e69fd81f67;hpb=52e2005b3e60cbbe938c1abe34019e511c5f15de;p=simgear.git diff --git a/simgear/misc/commands.cxx b/simgear/misc/commands.cxx index 0b471651..88869848 100644 --- a/simgear/misc/commands.cxx +++ b/simgear/misc/commands.cxx @@ -8,36 +8,6 @@ #include "props_io.hxx" - -//////////////////////////////////////////////////////////////////////// -// Implementation of SGCommandState class. -//////////////////////////////////////////////////////////////////////// - -SGCommandState::SGCommandState () - : _args(0) -{ -} - -SGCommandState::SGCommandState (const SGPropertyNode * args) - : _args(0) -{ - setArgs(args); -} - -SGCommandState::~SGCommandState () -{ - delete _args; -} - -void -SGCommandState::setArgs (const SGPropertyNode * args) -{ - delete _args; - _args = new SGPropertyNode(); - copyProperties(args, _args); -} - - //////////////////////////////////////////////////////////////////////// // Implementation of SGCommandMgr class. @@ -81,14 +51,13 @@ SGCommandMgr::getCommandNames () const } bool -SGCommandMgr::execute (const string &name, const SGPropertyNode * arg, - SGCommandState ** state) const +SGCommandMgr::execute (const string &name, const SGPropertyNode * arg) const { command_t command = getCommand(name); if (command == 0) return false; else - return (*command)(arg, state); + return (*command)(arg); } // end of commands.cxx