- Timestamp:
- 06/10/08 21:35:31 (5 years ago)
- File:
-
- 1 edited
-
trunk/src/configuration.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/configuration.cpp
r170 r176 75 75 76 76 while(!file->eof()) { 77 char temp_chr = file->get(); 78 file->unget(); 79 if (temp_chr == '[') { //new section started 80 // we already called unget 81 return; 82 } 77 83 getline(*file,temp_line); 78 84 pos = temp_line.find('='); 79 85 if (pos == string::npos) { 80 // this isn't a configuration line. 81 // set the get pointer of the file to the beginning 82 // of the line 83 file->seekg(-1-temp_line.length(),ios_base::cur); 84 /* I didn't use ifstream::gcount in the above line 85 * because I used the getline from string.h and not 86 * ifstream::getline 87 */ 88 return; 86 // this isn't a configuration line, but it isn't a new section 87 // as we checked this before, just skip 88 continue; 89 89 } 90 90 m_settings[temp_line.substr(0,pos)] = temp_line.substr(pos+1); … … 95 95 { 96 96 char temp_chr; 97 size_t pos; // used to loacate the '=' sign98 97 int score; 99 98 string date,hour,name;
Note: See TracChangeset
for help on using the changeset viewer.
