Skip to content

Commit

Permalink
Fix MSVC compiler warnings
Browse files Browse the repository at this point in the history
reg. 'argument': conversion from 'size_t' to 'int', possible loss of data (C4267)
  • Loading branch information
Jojo-Schmitz committed Nov 7, 2024
1 parent 28915e8 commit ff44645
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/engraving/dom/trill.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,13 +268,13 @@ PointF Trill::trillLinePos(const SLine* line, Grip grip, System** system)
return PointF(x, 0.0);
}

Segment* graceNoteSeg = segment->preAppendedItem(line->track2()) ? segment : nullptr;
Segment* graceNoteSeg = segment->preAppendedItem(static_cast<int>(line->track2())) ? segment : nullptr;
Segment* clefSeg = segment->isClefType() ? segment : nullptr;
Fraction curTick = segment->tick();
while (true) {
Segment* prevSeg = mmRest ? segment->prev1MM() : segment->prev1();
if (prevSeg && prevSeg->tick() == curTick) {
graceNoteSeg = prevSeg->preAppendedItem(line->track2()) ? prevSeg : graceNoteSeg;
graceNoteSeg = prevSeg->preAppendedItem(static_cast<int>(line->track2())) ? prevSeg : graceNoteSeg;
clefSeg = prevSeg->isClefType() ? prevSeg : clefSeg;
segment = prevSeg;
} else {
Expand All @@ -295,7 +295,7 @@ PointF Trill::trillLinePos(const SLine* line, Grip grip, System** system)

// Stop line before grace notes
if (graceNoteSeg) {
const EngravingItem* preAppendedItem = graceNoteSeg->preAppendedItem(line->track2());
const EngravingItem* preAppendedItem = graceNoteSeg->preAppendedItem(static_cast<int>(line->track2())));
if (preAppendedItem && preAppendedItem->isGraceNotesGroup()) {
// get x position of leftmost grace note
const Chord* leftMostGraceChord = nullptr;
Expand Down

0 comments on commit ff44645

Please sign in to comment.