Closed lathoub closed 2 years ago
modified all commands, callbacks and setters with no return value (void) to return a reference to this.
example:
template<class Transport, class Settings, class Platform> void MidiInterface<Transport, Settings, Platform>::begin(Channel inChannel) { ... }
becomes
template<class Transport, class Settings, class Platform> MidiInterface<Transport, Settings, Platform>& MidiInterface<Transport, Settings, Platform>::begin(Channel inChannel) { ... return *this; }
this modif has no impact on existing code, and code size
Coverage decreased (-0.008%) to 99.624% when pulling 417beca1c70c8d21d54562d0753d91d11f71c7ea on chaining into b4daa697a9927c4f52d766f18dcd0f7ad305c3d8 on master.
Not sure how to fix the platformIO errors
It's under discussion here, I'll have a look, it's nothing related to this PR.
added example on how to use command chaining with lambda functions
modified all commands, callbacks and setters with no return value (void) to return a reference to this.
example:
becomes
this modif has no impact on existing code, and code size