fix: Fix more sign / implicit type conversion warnings

This commit is contained in:
Francois Best 2018-03-10 17:59:17 +01:00
parent c5833214a1
commit 33bd77dd13
2 changed files with 2 additions and 2 deletions

View File

@ -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;
}
}

View File

@ -292,7 +292,7 @@ template<class SerialPort, class Settings>
void MidiInterface<SerialPort, Settings>::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);
}