Changeset 7386 in orxonox.OLD for trunk/src/lib/shell/shell_command_class.cc
- Timestamp:
- Apr 26, 2006, 10:24:31 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/shell/shell_command_class.cc
r7374 r7386 66 66 * @returns true on success, false otherwise 67 67 */ 68 bool ShellCommandClass::getCommandListOfClass(const std::string& className, std::list<std::string>* stringList) 69 { 70 if (stringList == NULL) 71 return false; 72 68 bool ShellCommandClass::getCommandListOfClass(const std::string& className, std::list<std::string>& stringList) 69 { 73 70 std::list<ShellCommandClass*>::iterator elem; 74 71 for(elem = ShellCommandClass::commandClassList->begin(); elem != ShellCommandClass::commandClassList->end(); elem++) … … 78 75 std::list<ShellCommand*>::iterator command; 79 76 for(command = (*elem)->commandList.begin(); command != (*elem)->commandList.end(); command++) 80 stringList ->push_back((*command)->getName());77 stringList.push_back((*command)->getName()); 81 78 } 82 79 } … … 89 86 * @returns true on success, false otherwise 90 87 */ 91 bool ShellCommandClass::getCommandListOfAlias(std::list<std::string> *stringList)92 { 93 if ( stringList == NULL ||ShellCommandClass::aliasList == NULL)88 bool ShellCommandClass::getCommandListOfAlias(std::list<std::string>& stringList) 89 { 90 if (ShellCommandClass::aliasList == NULL) 94 91 return false; 95 92 96 93 std::list<ShellCommandAlias*>::iterator alias; 97 94 for (alias = ShellCommandClass::aliasList->begin(); alias != ShellCommandClass::aliasList->end(); alias++) 98 stringList ->push_back((*alias)->getName());95 stringList.push_back((*alias)->getName()); 99 96 return true; 100 97 }
Note: See TracChangeset
for help on using the changeset viewer.