Skip to content

Commit

Permalink
Fix compilation on g++-4.9
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom94 committed May 31, 2018
1 parent 4a7802b commit 0a5c801
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/performance/Processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,8 @@ void Processor::ProcessScores(const std::vector<s64>& scoreIds)
auto progress = tlog::progress(scoreIds.size());

struct Result {
Score::PPRecord Score;
User User;
Score::PPRecord PP;
s64 UserId;
EMods Mods;
};

Expand Down Expand Up @@ -335,17 +335,17 @@ void Processor::ProcessScores(const std::vector<s64>& scoreIds)
continue;
}

results.push_back({*scoreIt, user, res[1]});
results.push_back({*scoreIt, user.Id(), res[1]});
progress.update(results.size());
}

tlog::info() << StrFormat("Sorting {0} results.", results.size());

std::sort(std::begin(results), std::end(results), [](const Result& a, const Result& b) {
if (a.Score.Value != b.Score.Value)
return a.Score.Value > b.Score.Value;
if (a.PP.Value != b.PP.Value)
return a.PP.Value > b.PP.Value;

return a.Score.ScoreId > b.Score.ScoreId;
return a.PP.ScoreId > b.PP.ScoreId;
});

tlog::success() << StrFormat(
Expand All @@ -364,10 +364,10 @@ void Processor::ProcessScores(const std::vector<s64>& scoreIds)
{
tlog::info() << StrFormat(
"{0w16ar} {1p1w6ar}pp {2w6arp2} % {3} - {4}",
retrieveUserName(result.User.Id(), *_pDBSlave),
result.Score.Value,
result.Score.Accuracy * 100,
retrieveBeatmapName(result.Score.BeatmapId, *_pDBSlave),
retrieveUserName(result.UserId, *_pDBSlave),
result.PP.Value,
result.PP.Accuracy * 100,
retrieveBeatmapName(result.PP.BeatmapId, *_pDBSlave),
ToString(result.Mods)
);
}
Expand Down

0 comments on commit 0a5c801

Please sign in to comment.