Skip to content

Commit 4e25547

Browse files
authored
Merge pull request #32771 from Jojo-Schmitz/compiler-warnings
Fix MSVC Compiler warnings
2 parents a82e0fc + 8647d84 commit 4e25547

5 files changed

Lines changed: 8 additions & 20 deletions

File tree

src/framework/midi/midievent.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ struct Event {
440440

441441
switch (messageType()) {
442442
case MessageType::ChannelVoice10: return m_data[0] & 0x7F;
443-
case MessageType::ChannelVoice20: return scaleDown(m_data[1] >> 16, 16, 7);
443+
case MessageType::ChannelVoice20: return static_cast<uint8_t>(scaleDown(m_data[1] >> 16, 16, 7));
444444
default: assert(false);
445445
}
446446
return 0;
@@ -471,7 +471,7 @@ struct Event {
471471
assertOpcode({ Opcode::NoteOn, Opcode::NoteOff });
472472

473473
switch (messageType()) {
474-
case MessageType::ChannelVoice10: return scaleUp(m_data[0] & 0x7F, 7, 16);
474+
case MessageType::ChannelVoice10: return static_cast<uint16_t>(scaleUp(m_data[0] & 0x7F, 7, 16));
475475
case MessageType::ChannelVoice20: return static_cast<uint16_t>(m_data[1] >> 16);
476476
default: assert(false);
477477
}
@@ -592,9 +592,11 @@ struct Event {
592592
{
593593
uint32_t val = data();
594594
if (messageType() == MessageType::ChannelVoice20) {
595-
return scaleDown(val, 32, 7);
595+
val = scaleDown(val, 32, 7);
596+
} else if (messageType() == MessageType::ChannelVoice10 && opcode() == Opcode::PitchBend) {
597+
val = scaleDown(val, 14, 7);
596598
}
597-
return val;
599+
return val & 0x7F;
598600
}
599601

600602
uint32_t data14() const
@@ -836,7 +838,7 @@ struct Event {
836838
//D2.3
837839
case Opcode::AssignableController:
838840
case Opcode::RegisteredController: {
839-
std::vector<std::pair<uint8_t, uint8_t> > controlChanges = {
841+
std::vector<std::pair<uint8_t, uint32_t> > controlChanges = {
840842
{ (opcode() == Opcode::RegisteredController ? 101 : 99), bank() },
841843
{ (opcode() == Opcode::RegisteredController ? 100 : 98), index() },
842844
{ 6, data() >> 25 }, // first 7 bits

src/framework/ui/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ target_sources(muse_ui PRIVATE
9595
view/widgetstatestore.cpp
9696
view/widgetstatestore.h
9797
view/widgetutils.h
98-
view/widgetdialog.cpp
9998
view/widgetdialog.h
10099
)
101100

src/framework/ui/view/widgetdialog.cpp

Whitespace-only changes.

src/notation/internal/notationparts.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,6 @@ using namespace mu::engraving;
4848

4949
static const mu::engraving::Fraction DEFAULT_TICK = mu::engraving::Fraction(0, 1);
5050

51-
static String formatInstrumentTitleOnScore(const String& instrumentName, const Trait& trait)
52-
{
53-
// Comments for translators start with //:
54-
55-
if (trait.type == TraitType::Transposition && !trait.isHiddenOnScore) {
56-
//: %1=name ("Horn"), %2=transposition ("C alto"). Example: "Horn in C alto"
57-
return muse::qtrc("notation", "%1 in %2", "Transposing instrument displayed in the score")
58-
.arg(instrumentName, trait.name);
59-
}
60-
61-
return instrumentName; // Example: "Flute"
62-
}
63-
6451
NotationParts::NotationParts(IGetScore* getScore, INotationInteractionPtr interaction, INotationUndoStackPtr undoStack)
6552
: m_getScore(getScore), m_undoStack(undoStack), m_interaction(interaction)
6653
{

src/notationscene/widgets/editstyle.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4060,7 +4060,7 @@
40604060
</widget>
40614061
</item>
40624062
<item>
4063-
<widget class="QGroupBox" name="groupBox">
4063+
<widget class="QGroupBox" name="groupBox_brackets">
40644064
<property name="title">
40654065
<string>Group brackets</string>
40664066
</property>

0 commit comments

Comments
 (0)