From ff44645e7c51d7271ede40b20ce9e817386b7dde Mon Sep 17 00:00:00 2001 From: Joachim Schmitz Date: Thu, 7 Nov 2024 19:08:21 +0100 Subject: [PATCH] Fix MSVC compiler warnings reg. 'argument': conversion from 'size_t' to 'int', possible loss of data (C4267) --- src/engraving/dom/trill.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/engraving/dom/trill.cpp b/src/engraving/dom/trill.cpp index adfdcc15aedbe..c7d3267226263 100644 --- a/src/engraving/dom/trill.cpp +++ b/src/engraving/dom/trill.cpp @@ -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(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(line->track2())) ? prevSeg : graceNoteSeg; clefSeg = prevSeg->isClefType() ? prevSeg : clefSeg; segment = prevSeg; } else { @@ -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(line->track2()))); if (preAppendedItem && preAppendedItem->isGraceNotesGroup()) { // get x position of leftmost grace note const Chord* leftMostGraceChord = nullptr;