Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 7, 2018, 8:03:19 PM (6 years ago)
Author:
landauf
Message:

[Highscore_HS16] reverted changes in LevelInfo - they don't seem to be needed (everything is done by the Highscore class)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/LevelInfo.cc

    r11356 r11714  
    151151    }
    152152
    153     bool LevelInfoItem::addHighscore(const std::string& name, const int score)
    154     {
    155         std::stringstream stream;
    156         stream << name << "/:/" << score;
    157         bool success = this->highscores_.insert(stream.str()).second;
    158         if(success)
    159             this->highscoresUpdated();
    160         return success;
    161     }
    162 
    163153    /**
    164154    @brief
     
    201191    }
    202192
    203     void LevelInfoItem::highscoresUpdated(void)
    204     {
    205         std::stringstream stream;
    206         std::set<std::string>::iterator temp;
    207         for(std::set<std::string>::iterator it = this->highscores_.begin(); it != this->highscores_.end(); )
    208         {
    209             temp = it;
    210             if(++it == this->highscores_.end()) // If this is the last tag we don't add a comma.
    211                 stream << *temp;
    212             else
    213                 stream << *temp << ", ";
    214         }
    215 
    216         this->highscoresString_ = std::string(stream.str());
    217     }
    218193    /**
    219194    @brief
Note: See TracChangeset for help on using the changeset viewer.