Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5146 in orxonox.OLD for trunk/src/util


Ignore:
Timestamp:
Aug 27, 2005, 2:34:18 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: calling to 1-param works (without any real parameters)

Location:
trunk/src/util
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/util/shell_command.cc

    r5145 r5146  
    5252  for (unsigned int i = 0; i < paramCount; i++)
    5353  {
    54     parameters[i] = va_arg(parameters, long);
    55 
    56     switch (parameters[i])
     54    this->parameters[i] = va_arg(parameters, long);
     55
     56    switch (this->parameters[i])
    5757    {
    5858      case ParameterBool:
     
    145145      const char* commandBegin = executionString + strlen(elem->className);
    146146
    147       PRINTF(5)("Class %s matches\n", elem->className);
     147      PRINTF(4)("Class %s matches\n", elem->className);
    148148      BaseObject* objectPointer = NULL;
    149149      if (elem->isSingleton)
     
    175175          if(!strncmp(commandBegin, enumBO->getName(), strlen(enumBO->getName())))
    176176          {
    177             PRINTF(5)("Object %s matches\n", enumBO->getName());
     177            PRINTF(4)("Object %s matches\n", enumBO->getName());
    178178            objectPointer = enumBO;
    179179            break;
     
    201201        paramBegin = commandBegin + strlen(elem->getName());
    202202
    203       if (objectPointer != NULL)
     203      if (objectPointer != NULL && paramBegin != NULL)
    204204      {
    205205        elem->executeCommand(objectPointer, paramBegin);
  • trunk/src/util/shell_command.h

    r5145 r5146  
    6969
    7070#define ShellCommandExecute1(t1) \
    71    else if (this->paramCount == 1 && this->parameters[0] & t1##_PARAM) \
     71   else if (this->paramCount == 1 && this->parameters[0] == t1##_PARAM) \
    7272       (dynamic_cast<T*>(object)->*functionPointer_1_##t1)(0)//t1##_FUNC(parameters, 0))
    7373
Note: See TracChangeset for help on using the changeset viewer.