Skip to content

Commit

Permalink
fixed strict weak ordering for std::sort
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpavlov96 committed Dec 10, 2024
1 parent 154aba2 commit 875a545
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/engraving/rendering/score/accidentalslayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ void AccidentalsLayout::applyOrderingOffsets(std::vector<Accidental*>& accidenta

// Sort vector
std::sort(accidentals.begin(), accidentals.end(), [](const Accidental* acc1, const Accidental* acc2) {
return acc1->stackingOrder() <= acc2->stackingOrder();
return acc1->stackingOrder() < acc2->stackingOrder();
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/engraving/rendering/score/chordlayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2496,7 +2496,7 @@ void ChordLayout::layoutChords3(const std::vector<Chord*>& chords,

std::vector<Note*> chordNotes = chord->notes();
std::sort(chordNotes.begin(), chordNotes.end(),
[](Note* n1, const Note* n2) ->bool { return n1->line() <= n2->line(); });
[](Note* n1, const Note* n2) ->bool { return n1->line() < n2->line(); });
for (Note* note : chordNotes) {
double noteX = 0.0;
if (note->ldata()->mirror()) {
Expand Down

0 comments on commit 875a545

Please sign in to comment.