Skip to content

Commit 00130fc

Browse files
committed
Fix MSVC compiler warnings
reg.: declaration hides previous local declaration (C4456)
1 parent d36e381 commit 00130fc

File tree

6 files changed

+12
-17
lines changed

6 files changed

+12
-17
lines changed

src/braille/internal/notationbraille.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,8 +573,8 @@ void NotationBraille::setKeys(const QString& sequence)
573573
if (brailleInput()->longSlurStart()) {
574574
if (brailleInput()->longSlurStartNote() == NULL) {
575575
if (currentEngravingItem() != NULL && currentEngravingItem()->isNote()) {
576-
Note* note = toNote(currentEngravingItem());
577-
brailleInput()->setLongSlurStartNote(note);
576+
Note* currentNote = toNote(currentEngravingItem());
577+
brailleInput()->setLongSlurStartNote(currentNote);
578578
}
579579
}
580580
}

src/engraving/dom/cmd.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,8 +1444,8 @@ bool Score::makeGap1(const Fraction& baseTick, staff_idx_t staffIdx, const Fract
14441444
continue;
14451445
}
14461446
Fraction tick = baseTick + Fraction::fromTicks(voiceOffset[track - strack]);
1447-
Measure* m = tick2measure(tick);
1448-
if ((track % VOICES) && !m->hasVoices(staffIdx)) {
1447+
Measure* tm = tick2measure(tick);
1448+
if ((track % VOICES) && !tm->hasVoices(staffIdx)) {
14491449
continue;
14501450
}
14511451

src/engraving/dom/score.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3564,10 +3564,10 @@ static Segment* findElementEndSegment(Score* score, EngravingItem* e, Segment* d
35643564
cr = toChordRest(e->parentItem());
35653565
} else if (e->isChordRest()) {
35663566
cr = toChordRest(e);
3567-
} else if (EngravingItem* a = e->findAncestor(ElementType::CHORD)) {
3568-
cr = toChordRest(a);
3569-
} else if (EngravingItem* a = e->findAncestor(ElementType::REST)) {
3570-
cr = toChordRest(a);
3567+
} else if (EngravingItem* c = e->findAncestor(ElementType::CHORD)) {
3568+
cr = toChordRest(c);
3569+
} else if (EngravingItem* r = e->findAncestor(ElementType::REST)) {
3570+
cr = toChordRest(r);
35713571
}
35723572

35733573
if (cr) {

src/engraving/rendering/score/measurelayout.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1852,9 +1852,9 @@ void MeasureLayout::setCourtesyClef(Measure* m, const Fraction& refClefTick, con
18521852
refClefElementTick - refMeasure->tick()) : nullptr;
18531853
if (!actualClefSeg && refMeasure && refMeasure->prevMeasure()) {
18541854
// Check previous measure
1855-
Measure* prevMeasure = refMeasure->prevMeasure();
1855+
Measure* refPrevMeasure = refMeasure->prevMeasure();
18561856
actualClefSeg
1857-
= prevMeasure->findSegmentR(SegmentType::Clef | SegmentType::HeaderClef, refClefElementTick - prevMeasure->tick());
1857+
= refPrevMeasure->findSegmentR(SegmentType::Clef | SegmentType::HeaderClef, refClefElementTick - refPrevMeasure->tick());
18581858
}
18591859
const EngravingItem* el = actualClefSeg ? actualClefSeg->element(track) : nullptr;
18601860
const Clef* actualClef = el ? toClef(el) : nullptr;

src/engraving/rendering/score/systemlayout.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,10 +1415,6 @@ void SystemLayout::layoutSystemElements(System* system, LayoutContext& ctx)
14151415
if (!e->isParenthesis() || !e->addToSkyline()) {
14161416
continue;
14171417
}
1418-
EngravingItem* parent = e->parentItem(true);
1419-
IF_ASSERT_FAILED(parent && parent->isSegment()) {
1420-
continue;
1421-
}
14221418

14231419
if (s->isType(SegmentType::TimeSigType)) {
14241420
TimeSig* ts = toTimeSig(s->element(e->track()));
@@ -1432,7 +1428,6 @@ void SystemLayout::layoutSystemElements(System* system, LayoutContext& ctx)
14321428
}
14331429

14341430
staff_idx_t si = e->staffIdx();
1435-
Segment* s = toSegment(parent);
14361431
Measure* m = s->measure();
14371432
system->staff(si)->skyline().add(e->shape().translate(e->pos() + s->pos() + m->pos() + e->staffOffset()));
14381433
}

src/framework/audio/internal/synthesizers/fluidsynth/fluidsequencer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ void FluidSequencer::updatePlaybackEvents(EventSequenceMap& destination, const m
143143

144144
destination[timestampTo].emplace(std::move(noteOff));
145145

146-
for (const auto& pair : noteEvent.expressionCtx().articulations) {
147-
const mpe::ArticulationMeta& meta = pair.second.meta;
146+
for (const auto& artPair : noteEvent.expressionCtx().articulations) {
147+
const mpe::ArticulationMeta& meta = artPair.second.meta;
148148

149149
if (muse::contains(BEND_SUPPORTED_TYPES, meta.type)) {
150150
appendPitchBend(destination, noteEvent, meta, channelIdx);

0 commit comments

Comments
 (0)