Changeset 9372 in orxonox.OLD
- Timestamp:
- Jul 20, 2006, 11:44:25 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/shell/shell_command.cc
r9371 r9372 119 119 120 120 CmdList::const_iterator elem; 121 for (elem = cmdClass->commandList.begin(); elem != cmdClass->commandList.end(); elem++) 122 if (commandName == (*elem)->getName()) 123 return (*elem); 121 for (unsigned int i = 0; i < cmdClass->commandList.size(); i++) 122 { 123 if (commandName == cmdClass->commandList[i]->getName()) 124 return (cmdClass->commandList[i]); 125 } 124 126 return NULL; 125 127 } … … 137 139 if (likely(checkClass != NULL)) 138 140 return ShellCommand::getCommand(commandName, checkClass); 139 return NULL; 141 else 142 return NULL; 140 143 } 141 144 … … 149 152 const ShellCommand* const ShellCommand::getCommandFromInput(const std::string& inputLine, unsigned int& paramBegin, std::vector<BaseObject*>* boList) 150 153 { 151 return ShellCommand::getCommandFromInput(SubString(inputLine, SubString::WhiteSpaces), paramBegin );154 return ShellCommand::getCommandFromInput(SubString(inputLine, SubString::WhiteSpaces), paramBegin, boList); 152 155 } 153 156 … … 199 202 { 200 203 // Search for Objects. 201 retCmd = ShellCommand::getCommand( strings[1], cmdClass);204 retCmd = ShellCommand::getCommand((strings.size() > 1) ? strings[1] : "", cmdClass); 202 205 if (retCmd != NULL) 203 206 { … … 210 213 if (retCmd == NULL && strings.size() >= 2) 211 214 { 212 retCmd = ShellCommand::getCommand( strings[2], cmdClass);215 retCmd = ShellCommand::getCommand((strings.size() > 2) ? strings[2] : "", cmdClass); 213 216 if (retCmd != NULL) 214 217 {
Note: See TracChangeset
for help on using the changeset viewer.