Skip to content

Commit

Permalink
Merge pull request #25804 from alexpavlov96/weak_ordering_4.4
Browse files Browse the repository at this point in the history
fixed strict weak ordering for std::sort
  • Loading branch information
alexpavlov96 authored Dec 11, 2024
2 parents 2232670 + 5dc4b17 commit ffc276d
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/dev/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/dev/chordlayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2487,7 +2487,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 ffc276d

Please sign in to comment.