Skip to content

Commit

Permalink
null -> nullptr
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Nov 30, 2018
1 parent 21d4393 commit 00c04d4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions src/ScoreManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,16 @@ ScoresForChart::SetTopScores()
eligiblescores.emplace_back(hs);
}

if (eligiblescores.size() < 2) {
FOREACHM(int, ScoresAtRate, ScoresByRate, i)
{
auto& hs = i->second.PBptr;
if (hs && hs->GetSSRCalcVersion() == GetCalcVersion() &&
hs->GetEtternaValid() && hs->GetGrade() != Grade_Failed)
eligiblescores.emplace_back(hs);
}
}

if (eligiblescores.empty())
return;

Expand Down
4 changes: 2 additions & 2 deletions src/SongManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -637,15 +637,15 @@ SongManager::GetStepsByChartkey(RString ck)
{
if (StepsByKey.count(ck))
return StepsByKey[ck];
return NULL;
return nullptr;
}

Song*
SongManager::GetSongByChartkey(RString ck)
{
if (SongsByKey.count(ck))
return SongsByKey[ck];
return NULL;
return nullptr;
}

static LocalizedString FOLDER_CONTAINS_MUSIC_FILES(
Expand Down

0 comments on commit 00c04d4

Please sign in to comment.