]> git.tdb.fi Git - gldbg.git/blobdiff - source/commandinterpreter.cpp
Fix things for 64-bit systems
[gldbg.git] / source / commandinterpreter.cpp
index d3db5a49412ad8b19f01b55702b9fbf19f0cd898..3227d40c42788164f4f0066468a5cc654e27135f 100644 (file)
@@ -53,9 +53,15 @@ CommandInterpreter::CommandInterpreter(GlDbg &d):
 
 }
 
+CommandInterpreter::~CommandInterpreter()
+{
+       for(CommandMap::iterator i=commands.begin(); i!=commands.end(); ++i)
+               delete i->second;
+}
+
 void CommandInterpreter::execute(const string &cmd)
 {
-       unsigned space = cmd.find(' ');
+       string::size_type space = cmd.find(' ');
        string name = cmd.substr(0, space);
        CommandMap::const_iterator i = commands.lower_bound(name);
        if(i==commands.end() || i->first.compare(0, name.size(), name))