Skip to content

Commit

Permalink
fixing missing const qualifies in scoreman chartkeys
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Jun 2, 2017
1 parent 39d8fa0 commit 7e5cb55
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/ScoreManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,13 @@ vector<HighScore*> ScoresForChart::GetAllPBPtrs() {
return o;
}

HighScore* ScoreManager::GetChartPBAt(string& ck, float& rate) {
HighScore* ScoreManager::GetChartPBAt(const string& ck, float& rate) {
if (pscores.count(ck))
return pscores.at(ck).GetPBAt(rate);
return NULL;
}

HighScore* ScoreManager::GetChartPBUpTo(string& ck, float& rate) {
HighScore* ScoreManager::GetChartPBUpTo(const string& ck, float& rate) {
if (pscores.count(ck))
return pscores.at(ck).GetPBUpTo(rate);
return NULL;
Expand Down
6 changes: 3 additions & 3 deletions src/ScoreManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ class ScoreManager
~ScoreManager();


HighScore* GetChartPBAt(string& ck, float& rate);
HighScore* GetChartPBAt(const string& ck, float& rate);

// technically "up to and including rate: x" but that's a mouthful -mina
HighScore* GetChartPBUpTo(string& ck, float& rate);
HighScore* GetChartPBUpTo(const string& ck, float& rate);

Grade GetBestGradeFor(string& ck) { if (pscores.count(ck)) return pscores[ck].bestGrade; return Grade_Invalid; }
Grade GetBestGradeFor(const string& ck) { if (pscores.count(ck)) return pscores[ck].bestGrade; return Grade_Invalid; }

// for scores achieved during this session
void AddScore(const HighScore& hs_) { HighScore hs = hs_; pscores[hs.GetChartKey()].AddScore(hs); }
Expand Down

0 comments on commit 7e5cb55

Please sign in to comment.