- Timestamp:
- Oct 4, 2015, 9:12:21 PM (10 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
-
code/trunk/src/libraries/core/command/CommandEvaluation.cc
r9550 r10624 37 37 #include "CommandExecutor.h" 38 38 #include "ConsoleCommand.h" 39 #include "ConsoleCommandManager.h" 39 40 40 41 namespace orxonox … … 305 306 // the user typed 1-2 arguments, check what he tried to type and print a suitable error 306 307 std::string groupLC = getLowercase(this->getToken(0)); 307 for (std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = ConsoleCommand ::getCommandsLC().begin(); it_group != ConsoleCommand::getCommandsLC().end(); ++it_group)308 for (std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = ConsoleCommandManager::getInstance().getCommandsLC().begin(); it_group != ConsoleCommandManager::getInstance().getCommandsLC().end(); ++it_group) 308 309 if (it_group->first == groupLC) 309 310 return std::string("Error: There is no command in group \"") + this->getToken(0) + "\" starting with \"" + this->getToken(1) + "\"."; … … 327 328 328 329 // iterate through all groups and their commands and calculate the distance to the current command. keep the best. 329 for (std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = ConsoleCommand ::getCommandsLC().begin(); it_group != ConsoleCommand::getCommandsLC().end(); ++it_group)330 for (std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = ConsoleCommandManager::getInstance().getCommandsLC().begin(); it_group != ConsoleCommandManager::getInstance().getCommandsLC().end(); ++it_group) 330 331 { 331 332 if (it_group->first != "") … … 345 346 346 347 // now also iterate through all shortcuts and keep the best if it's better than the one found above. 347 std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = ConsoleCommand ::getCommandsLC().find("");348 if (it_group != ConsoleCommand ::getCommandsLC().end())348 std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = ConsoleCommandManager::getInstance().getCommandsLC().find(""); 349 if (it_group != ConsoleCommandManager::getInstance().getCommandsLC().end()) 349 350 { 350 351 for (std::map<std::string, ConsoleCommand*>::const_iterator it_name = it_group->second.begin(); it_name != it_group->second.end(); ++it_name)
Note: See TracChangeset
for help on using the changeset viewer.