Skip to content

Commit

Permalink
don't write a noccpbkey unless it's different from the pbkey
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Sep 17, 2017
1 parent 49c669f commit c7addfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ScoreManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ XNode* ScoresAtRate::CreateNode(const int& rate) const {
string rs = ssprintf("%.3f", static_cast<float>(rate) / 10000.f);
// should be safe as this is only called if there is at least 1 score (which would be the pb)
o->AppendAttr("PBKey", PBptr->GetScoreKey());
if(noccPBptr != nullptr)
if(noccPBptr != nullptr && PBptr->GetScoreKey() != noccPBptr->GetScoreKey()) // don't write unless it's different from the pbkey -mina
o->AppendAttr("noccPBKey", noccPBptr->GetScoreKey());
o->AppendAttr("BestGrade", GradeToString(bestGrade));
o->AppendAttr("Rate", rs);
Expand Down

0 comments on commit c7addfc

Please sign in to comment.