Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4597 in orxonox.OLD for orxonox/trunk/src/lib/util/substring.cc


Ignore:
Timestamp:
Jun 11, 2005, 12:55:48 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: setClassID implemented in all files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/util/substring.cc

    r4220 r4597  
    1 /* 
     1/*
    22   orxonox - the future of 3D-vertical-scrollers
    33
     
    1111   ### File Specific:
    1212   main-programmer: Christian Meyer
    13    co-programmer: ...
     13   co-programmer: Benjamin Grauer
     14
     15   2005-06-10: some naming conventions
    1416*/
    1517
     
    2830{
    2931  n = 0;
    30        
     32
    3133  assert( string != NULL);
    32        
     34
    3335  for( int i = 0; i < strlen(string); i++) if( string[i] == ',') n++;
    3436
    3537  n += 1;
    36        
     38
    3739  strings = new char*[n];
    3840
    3941  assert (strings != NULL);
    40        
     42
    4143  int i = 0;
    4244  int l = 0;
    43        
     45
    4446  const char* offset = string;
    4547  char* end = strchr( string, ',');
     
    5759      end = strchr( offset, ',');
    5860    }
    59        
     61
    6062  strings[i] = new char[l + 1];
    6163  l = strlen( offset);
     
    7375      delete strings[i];
    7476    }
    75        
     77
    7678  delete strings;
    7779}
Note: See TracChangeset for help on using the changeset viewer.