From 33bd77dd13f24d8f7923c3601446a71df0d846c4 Mon Sep 17 00:00:00 2001 From: Francois Best Date: Sat, 10 Mar 2018 17:59:17 +0100 Subject: [PATCH] fix: Fix more sign / implicit type conversion warnings --- src/MIDI.cpp | 2 +- src/MIDI.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MIDI.cpp b/src/MIDI.cpp index 7761821..e14a98f 100644 --- a/src/MIDI.cpp +++ b/src/MIDI.cpp @@ -95,7 +95,7 @@ unsigned decodeSysEx(const byte* inSysEx, byte* outData, unsigned inLength) else { const byte body = inSysEx[i]; - const byte msb = ((msbStorage >> byteIndex--) & 1) << 7; + const byte msb = byte(((msbStorage >> byteIndex--) & 1) << 7); outData[count++] = msb | body; } } diff --git a/src/MIDI.hpp b/src/MIDI.hpp index 3ee7c8f..fa34533 100644 --- a/src/MIDI.hpp +++ b/src/MIDI.hpp @@ -292,7 +292,7 @@ template void MidiInterface::sendPitchBend(int inPitchValue, Channel inChannel) { - const unsigned bend = inPitchValue - MIDI_PITCHBEND_MIN; + const unsigned bend = unsigned(inPitchValue - int(MIDI_PITCHBEND_MIN)); send(PitchBend, (bend & 0x7f), (bend >> 7) & 0x7f, inChannel); }