Changeset 5633 in orxonox.OLD for trunk/src/lib/util/executor/executor.cc
- Timestamp:
- Nov 18, 2005, 6:08:36 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/util/executor/executor.cc
r5632 r5633 47 47 if (paramCount > FUNCTOR_MAX_ARGUMENTS) 48 48 paramCount = FUNCTOR_MAX_ARGUMENTS; 49 // reading in Parameters. 49 50 this->paramCount = paramCount; 50 this->parameters = new unsigned int[paramCount];51 51 this->defaultValue = new MultiType[paramCount]; 52 52 … … 56 56 // What Parameters we have got 57 57 for (unsigned int i = 0; i < paramCount; i++) 58 this-> parameters[i] = va_arg(parameterList, int);58 this->defaultValue[i].setType(va_arg(parameterList, int)); 59 59 } 60 60 … … 64 64 Executor::~Executor() 65 65 { 66 delete[] this->parameters;67 66 delete[] this->defaultValue; 68 67 } … … 106 105 for (unsigned int i = 0; i < count; i++) 107 106 { 108 109 110 switch (this->parameters[i]) 107 switch (this->defaultValue[i].getType()) 111 108 { 112 case ParameterBool:109 case MT_BOOL: 113 110 this->defaultValue[i].setInt(va_arg(defaultList, int)); 114 111 break; 115 case ParameterChar:112 case MT_CHAR: 116 113 this->defaultValue[i].setChar((char)va_arg(defaultList, int)); 117 114 break; 118 case ParameterString:115 case MT_STRING: 119 116 this->defaultValue[i].setString(va_arg(defaultList, char*)); 120 117 break; 121 case ParameterInt:118 case MT_INT: 122 119 this->defaultValue[i].setInt(va_arg(defaultList, int)); 123 120 break; 124 case ParameterUInt:121 /* case MT_UINT: 125 122 this->defaultValue[i].setInt((int)va_arg(defaultList, unsigned int)); 126 break; 127 case ParameterFloat:123 break;*/ 124 case MT_FLOAT: 128 125 this->defaultValue[i].setFloat(va_arg(defaultList, double)); 129 126 break; 130 case ParameterLong:127 /* case MT_LONG: 131 128 this->defaultValue[i].setInt((int) va_arg(defaultList, long)); 132 break; 129 break;*/ 133 130 default: 134 131 break;
Note: See TracChangeset
for help on using the changeset viewer.