Skip to content

Commit e1035a0

Browse files
committed
Update MIDI.hpp
fixed errors (return -> return *this where needed)
1 parent 2012e2a commit e1035a0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/MIDI.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ template<class Transport, class Settings, class Platform>
120120
MidiInterface<Transport, Settings, Platform>& MidiInterface<Transport, Settings, Platform>::send(const MidiMessage& inMessage)
121121
{
122122
if (!inMessage.valid)
123-
return;
123+
return *this;
124124

125125
if (mTransport.beginTransmission(inMessage.type))
126126
{
@@ -173,7 +173,7 @@ MidiInterface<Transport, Settings, Platform>& MidiInterface<Transport, Settings,
173173
inChannel == MIDI_CHANNEL_OMNI ||
174174
inType < 0x80)
175175
{
176-
return; // Don't send anything
176+
return *this; // Don't send anything
177177
}
178178
// Protection: remove MSBs on data
179179
inData1 &= 0x7f;
@@ -459,7 +459,7 @@ MidiInterface<Transport, Settings, Platform>& MidiInterface<Transport, Settings,
459459
break;
460460
default:
461461
// Invalid Common marker
462-
return;
462+
return *this;
463463
}
464464

465465
if (mTransport.beginTransmission(inType))
@@ -491,7 +491,7 @@ MidiInterface<Transport, Settings, Platform>& MidiInterface<Transport, Settings,
491491
if (Settings::UseRunningStatus)
492492
mRunningStatus_TX = InvalidType;
493493

494-
return *this;
494+
return *this;
495495
}
496496

497497
/*! \brief Send a Real Time (one byte) message.

0 commit comments

Comments
 (0)