Changeset 4734 in orxonox.OLD for orxonox/trunk/src/util/loading/load_param.cc
- Timestamp:
- Jun 29, 2005, 3:05:47 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/loading/load_param.cc
r4637 r4734 114 114 115 115 116 int isInt(const char* I nt, int defaultValue)116 int isInt(const char* INT, int defaultValue) 117 117 { 118 118 char* endPtr = NULL; 119 int result = strtol(I nt, &endPtr, 10);120 121 if ( endPtr >= I nt && endPtr < Int + strlen(Int))119 int result = strtol(INT, &endPtr, 10); 120 121 if ( endPtr >= INT && endPtr < INT + strlen(INT)) 122 122 return defaultValue; 123 123 else … … 125 125 } 126 126 127 float isFloat(const char* F loat, float defaultValue)127 float isFloat(const char* FLOAT, float defaultValue) 128 128 { 129 129 char* endPtr = NULL; 130 double result = strtod(F loat, &endPtr);131 132 if ( endPtr >= F loat && endPtr < Float + strlen(Float))130 double result = strtod(FLOAT, &endPtr); 131 132 if ( endPtr >= FLOAT && endPtr < FLOAT + strlen(FLOAT)) 133 133 return defaultValue; 134 134 else … … 136 136 } 137 137 138 const char* isString(const char* string, const char* defaultValue) 139 { 140 if (string != NULL) 141 return string; 138 const Vector& isVector(const char* VECTOR, const Vector& defaultValue) 139 { 140 141 142 } 143 144 const char* isString(const char* STRING, const char* defaultValue) 145 { 146 if (STRING != NULL) 147 return STRING; 142 148 else 143 149 return defaultValue;
Note: See TracChangeset
for help on using the changeset viewer.