Changeset 7219 in orxonox.OLD for branches/std/src/lib/shell/shell_command.cc
- Timestamp:
- Mar 12, 2006, 5:14:44 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/std/src/lib/shell/shell_command.cc
r7218 r7219 41 41 PRINTF(5)("create shellcommand %s %s\n", commandName, className); 42 42 this->setName(commandName); 43 this->description = NULL;44 this->alias = NULL;45 43 this->executor = executor.clone(); 46 44 this->executor->setName(commandName); … … 177 175 for (alias = ShellCommandClass::aliasList->begin(); alias != ShellCommandClass::aliasList->end(); alias++ ) 178 176 { 179 if ( (*alias)->getName() != NULL &&inputSplits.getString(0) == (*alias)->getName() && (*alias)->getCommand() != NULL &&177 if (inputSplits.getString(0) == (*alias)->getName() && (*alias)->getCommand() != NULL && 180 178 (*alias)->getCommand()->shellClass != NULL ) 181 179 { … … 258 256 * @param description the description of the Given command 259 257 */ 260 ShellCommand* ShellCommand::describe(const char*description)258 ShellCommand* ShellCommand::describe(const std::string& description) 261 259 { 262 260 if (this == NULL) … … 338 336 /* for (unsigned int i = 0; i< elem->paramCount; i++) 339 337 printf("%s ", ShellCommand::paramToString(elem->parameters[i]));*/ 340 if ( (*cmdIT)->description != NULL)341 printf("- %s", (*cmdIT)->description);338 if (!(*cmdIT)->description.empty()) 339 printf("- %s", (*cmdIT)->description.c_str()); 342 340 printf("\n"); 343 341
Note: See TracChangeset
for help on using the changeset viewer.