Skip to content

Commit

Permalink
ensure rate key score vectors are sorted on load
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Apr 30, 2017
1 parent e7348fe commit e627277
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2333,6 +2333,10 @@ void Profile::LoadEttScoresFromNode(const XNode* pSongScores) {
hsv.resize(hsv.size() + 1);
hsv.back().LoadFromNode(hs);
}
if (!is_sorted(hsv.begin(), hsv.end())) {
sort(hsv.begin(), hsv.end());
reverse(hsv.begin(), hsv.end());
}
hsrm.emplace(rate, hsv);
}

Expand Down

0 comments on commit e627277

Please sign in to comment.