Skip to content

Commit 33bd77d

Browse files
author
Francois Best
committed
fix: Fix more sign / implicit type conversion warnings
1 parent c583321 commit 33bd77d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/MIDI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ unsigned decodeSysEx(const byte* inSysEx, byte* outData, unsigned inLength)
9595
else
9696
{
9797
const byte body = inSysEx[i];
98-
const byte msb = ((msbStorage >> byteIndex--) & 1) << 7;
98+
const byte msb = byte(((msbStorage >> byteIndex--) & 1) << 7);
9999
outData[count++] = msb | body;
100100
}
101101
}

src/MIDI.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ template<class SerialPort, class Settings>
292292
void MidiInterface<SerialPort, Settings>::sendPitchBend(int inPitchValue,
293293
Channel inChannel)
294294
{
295-
const unsigned bend = inPitchValue - MIDI_PITCHBEND_MIN;
295+
const unsigned bend = unsigned(inPitchValue - int(MIDI_PITCHBEND_MIN));
296296
send(PitchBend, (bend & 0x7f), (bend >> 7) & 0x7f, inChannel);
297297
}
298298

0 commit comments

Comments
 (0)