Update MIDI.hpp

fixed errors (return -> return *this where needed)
This commit is contained in:
lathoub 2021-10-10 12:13:30 +02:00
parent 2012e2a84a
commit e1035a03f7
1 changed files with 4 additions and 4 deletions

View File

@ -120,7 +120,7 @@ template<class Transport, class Settings, class Platform>
MidiInterface<Transport, Settings, Platform>& MidiInterface<Transport, Settings, Platform>::send(const MidiMessage& inMessage) MidiInterface<Transport, Settings, Platform>& MidiInterface<Transport, Settings, Platform>::send(const MidiMessage& inMessage)
{ {
if (!inMessage.valid) if (!inMessage.valid)
return; return *this;
if (mTransport.beginTransmission(inMessage.type)) if (mTransport.beginTransmission(inMessage.type))
{ {
@ -173,7 +173,7 @@ MidiInterface<Transport, Settings, Platform>& MidiInterface<Transport, Settings,
inChannel == MIDI_CHANNEL_OMNI || inChannel == MIDI_CHANNEL_OMNI ||
inType < 0x80) inType < 0x80)
{ {
return; // Don't send anything return *this; // Don't send anything
} }
// Protection: remove MSBs on data // Protection: remove MSBs on data
inData1 &= 0x7f; inData1 &= 0x7f;
@ -459,7 +459,7 @@ MidiInterface<Transport, Settings, Platform>& MidiInterface<Transport, Settings,
break; break;
default: default:
// Invalid Common marker // Invalid Common marker
return; return *this;
} }
if (mTransport.beginTransmission(inType)) if (mTransport.beginTransmission(inType))
@ -491,7 +491,7 @@ MidiInterface<Transport, Settings, Platform>& MidiInterface<Transport, Settings,
if (Settings::UseRunningStatus) if (Settings::UseRunningStatus)
mRunningStatus_TX = InvalidType; mRunningStatus_TX = InvalidType;
return *this; return *this;
} }
/*! \brief Send a Real Time (one byte) message. /*! \brief Send a Real Time (one byte) message.