Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4734 in orxonox.OLD for orxonox/trunk/src/util/loading/load_param.cc


Ignore:
Timestamp:
Jun 29, 2005, 3:05:47 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: light loadable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/util/loading/load_param.cc

    r4637 r4734  
    114114
    115115
    116 int isInt(const char* Int, int defaultValue)
     116int isInt(const char* INT, int defaultValue)
    117117{
    118118  char* endPtr = NULL;
    119   int result = strtol(Int, &endPtr, 10);
    120 
    121   if ( endPtr >= Int && endPtr < Int + strlen(Int))
     119  int result = strtol(INT, &endPtr, 10);
     120
     121  if ( endPtr >= INT && endPtr < INT + strlen(INT))
    122122    return defaultValue;
    123123  else
     
    125125}
    126126
    127 float isFloat(const char* Float, float defaultValue)
     127float isFloat(const char* FLOAT, float defaultValue)
    128128{
    129129  char* endPtr = NULL;
    130   double result = strtod(Float, &endPtr);
    131 
    132   if ( endPtr >= Float && endPtr < Float + strlen(Float))
     130  double result = strtod(FLOAT, &endPtr);
     131
     132  if ( endPtr >= FLOAT && endPtr < FLOAT + strlen(FLOAT))
    133133    return defaultValue;
    134134  else
     
    136136}
    137137
    138 const char* isString(const char* string, const char* defaultValue)
    139 {
    140   if (string != NULL)
    141     return string;
     138const Vector& isVector(const char* VECTOR, const Vector& defaultValue)
     139{
     140
     141
     142}
     143
     144const char* isString(const char* STRING, const char* defaultValue)
     145{
     146  if (STRING != NULL)
     147    return STRING;
    142148  else
    143149    return defaultValue;
Note: See TracChangeset for help on using the changeset viewer.