Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5329 in orxonox.OLD for trunk/src/lib/util


Ignore:
Timestamp:
Oct 8, 2005, 11:07:21 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: executing static commands work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/util/helper_functions.cc

    r5270 r5329  
    2929bool isBool(const char* BOOL, bool defaultValue)
    3030{
     31  if (BOOL == NULL)
     32    return defaultValue;
    3133  if(!strcmp(BOOL, "1") || !strcmp( BOOL,"true") || !strcmp(BOOL,"TRUE"))
    3234    return true;
     
    4042int isInt(const char* INT, int defaultValue)
    4143{
     44  if (INT == NULL)
     45    return defaultValue;
    4246  char* endPtr = NULL;
     47
    4348  int result = strtol(INT, &endPtr, 10);
    4449
     
    5156float isFloat(const char* FLOAT, float defaultValue)
    5257{
     58  if (FLOAT == NULL)
     59    return defaultValue;
    5360  char* endPtr = NULL;
    5461  double result = strtod(FLOAT, &endPtr);
Note: See TracChangeset for help on using the changeset viewer.