Changeset 167 for trunk/src/configuration.cpp
- Timestamp:
- 10/03/2008 07:39:43 AM (4 years ago)
- File:
-
- 1 edited
-
trunk/src/configuration.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/configuration.cpp
r163 r167 21 21 #include <iostream> 22 22 #include <cstdlib> // used in the back-compatibility code 23 #include <sstream> 23 24 #include "configuration.h" 24 25 #include "../config.h" … … 103 104 string date,hour,name; 104 105 HighscoreItem temp_item; 106 107 temp_chr = file->get(); 108 file->unget(); 109 105 110 while(file->good()) { 106 111 temp_chr = file->get(); … … 323 328 return 0; 324 329 } 330 save(); 325 331 return place; 326 332 } … … 331 337 return ptr; 332 338 } 339 340 void Configuration::clearHighscores() 341 { 342 m_highscores.clear(); 343 save(); 344 } 345 346 void Configuration::setHighscoresSize(int size) 347 { 348 349 std::ostringstream o; 350 o << size; 351 m_settings["highscore-list-size"] = o.str(); 352 353 while (m_highscores.size()>size) { 354 m_highscores.pop_back(); 355 } 356 357 save(); 358 }
Note: See TracChangeset
for help on using the changeset viewer.
