From 84bdc525efc372a7a504f78842b9c551bdd2eb74 Mon Sep 17 00:00:00 2001 From: Joachim Schmitz Date: Wed, 24 Jul 2024 13:58:40 +0200 Subject: [PATCH 1/2] Fix MSVC compiler warning reg.: 'fretBackground': local variable is initialized but not referenced (C4189) --- src/engraving/rendering/dev/chordlayout.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/engraving/rendering/dev/chordlayout.cpp b/src/engraving/rendering/dev/chordlayout.cpp index ae8e438fe517c..267f9e76eb8e5 100644 --- a/src/engraving/rendering/dev/chordlayout.cpp +++ b/src/engraving/rendering/dev/chordlayout.cpp @@ -1539,10 +1539,6 @@ void ChordLayout::layoutChords1(LayoutContext& ctx, Segment* segment, staff_idx_ std::vector downStemNotes; int upVoices = 0; int downVoices = 0; - // Fret width plus white background box for TAB - const double fretBackground = ctx.conf().styleS(Sid::tabFretPadding).val() * staff->spatium(tick); - // double nominalWidth = !isTab ? ctx.conf().noteHeadWidth() * staff->staffMag(tick) - // : (ctx.conf().fretWidth(staffType) + 2 * fretBackground) * staff->staffMag(tick); double nominalWidth = ctx.conf().noteHeadWidth() * staff->staffMag(tick); double maxUpWidth = 0.0; double maxDownWidth = 0.0; From ae339e0f8451440a4acc0cb4b78acfa146159681 Mon Sep 17 00:00:00 2001 From: Joachim Schmitz Date: Sat, 10 Aug 2024 12:42:05 +0200 Subject: [PATCH 2/2] Fix MSVC compiler warnings reg.: 'argument': conversion from 'size_t' to 'int', possible loss of data (C4267) --- src/engraving/dom/edit.cpp | 2 +- src/engraving/dom/score.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engraving/dom/edit.cpp b/src/engraving/dom/edit.cpp index b6f238f876e5b..a341a64d205bc 100644 --- a/src/engraving/dom/edit.cpp +++ b/src/engraving/dom/edit.cpp @@ -3932,7 +3932,7 @@ void Score::cmdCreateTuplet(ChordRest* ocr, Tuplet* tuplet) // cmdExchangeVoice //--------------------------------------------------------- -void Score::cmdExchangeVoice(int s, int d) +void Score::cmdExchangeVoice(voice_idx_t s, voice_idx_t d) { if (!selection().isRange()) { MScore::setError(MsError::NO_STAFF_SELECTED); diff --git a/src/engraving/dom/score.h b/src/engraving/dom/score.h index 7d05f5afa2a38..0bebe6473eb19 100644 --- a/src/engraving/dom/score.h +++ b/src/engraving/dom/score.h @@ -955,7 +955,7 @@ class Score : public EngravingObject, public muse::Injectable void cmdSlashFill(); void cmdSlashRhythm(); void cmdResequenceRehearsalMarks(); - void cmdExchangeVoice(int, int); + void cmdExchangeVoice(voice_idx_t, voice_idx_t); void cmdRemoveEmptyTrailingMeasures(); void cmdRealizeChordSymbols(bool lit = true, Voicing v = Voicing(-1), HDuration durationType = HDuration(-1));