Changeset 5329 in orxonox.OLD for trunk/src/lib/util
- Timestamp:
- Oct 8, 2005, 11:07:21 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/util/helper_functions.cc
r5270 r5329 29 29 bool isBool(const char* BOOL, bool defaultValue) 30 30 { 31 if (BOOL == NULL) 32 return defaultValue; 31 33 if(!strcmp(BOOL, "1") || !strcmp( BOOL,"true") || !strcmp(BOOL,"TRUE")) 32 34 return true; … … 40 42 int isInt(const char* INT, int defaultValue) 41 43 { 44 if (INT == NULL) 45 return defaultValue; 42 46 char* endPtr = NULL; 47 43 48 int result = strtol(INT, &endPtr, 10); 44 49 … … 51 56 float isFloat(const char* FLOAT, float defaultValue) 52 57 { 58 if (FLOAT == NULL) 59 return defaultValue; 53 60 char* endPtr = NULL; 54 61 double result = strtod(FLOAT, &endPtr);
Note: See TracChangeset
for help on using the changeset viewer.