Ignore:
Timestamp:
09/27/2008 11:55:54 AM (4 years ago)
Author:
guyru
Message:

get const pointer to the highscorelist inside Configuration

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/configuration.cpp

    r160 r161  
    158158void Configuration::saveHighscores(ofstream *file) 
    159159{ 
    160         HighscoreList::iterator it; 
     160        HighscoresList::iterator it; 
    161161        for (it = m_highscores.begin(); it!=m_highscores.end(); it++) { 
    162162                (*file)<<(*it).score<<" "; 
     
    285285        } 
    286286 
    287         HighscoreList::iterator it= m_highscores.end(); 
     287        HighscoresList::iterator it= m_highscores.end(); 
    288288        if ((--it)->score<score) { 
    289289                return true; 
     
    306306        temp_item.name = name; 
    307307 
    308         HighscoreList::iterator it = m_highscores.begin(); 
     308        HighscoresList::iterator it = m_highscores.begin(); 
    309309        while (it!=m_highscores.end()) { 
    310310                if (it->score < temp_item.score) { 
     
    326326        return place; 
    327327} 
     328 
     329const HighscoresList* Configuration::getHighscores() const 
     330{ 
     331        const HighscoresList * ptr = &m_highscores; 
     332        return ptr; 
     333} 
Note: See TracChangeset for help on using the changeset viewer.