Skip to content

Commit

Permalink
Remove deprecated aliases
Browse files Browse the repository at this point in the history
MIDICNChannel, MIDICNChannelAddress, Control_Surface.MIDI()
  • Loading branch information
tttapa committed Nov 2, 2020
1 parent 05c3007 commit e64592f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 32 deletions.
13 changes: 0 additions & 13 deletions src/Control_Surface/Control_Surface_Class.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,6 @@ class Control_Surface_ : public MIDI_Sender<Control_Surface_>,
/// Disconnect Control Surface from the MIDI interfaces it's connected to.
void disconnectMIDI_Interfaces();

/**
* @brief Get a reference to the MIDI sender.
*
* @deprecated Use `Control_Surface.send(...)` directly instead of
* `Control_Surface.MIDI().send(...)`.
*/
[[deprecated("Use Control_Surface.send(...) directly, instead of "
"Control_Surface.MIDI().send(...)")]] //
MIDI_Sender<Control_Surface_> &
MIDI() {
return *this;
}

/// Update all MIDI interfaces to receive new MIDI events.
void updateMidiInput();
/// Update all MIDIInputElement%s.
Expand Down
26 changes: 7 additions & 19 deletions src/Def/MIDIAddress.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ BEGIN_CS_NAMESPACE

/// A struct for saving a MIDI address consisting of a 7-bit address, a 4-bit
/// channel, and a 4-bit cable number.
/// A MIDI address can be marked "invalid". The MIDI sending functions
/// A MIDI address can be marked "invalid". The MIDI sending functions
/// (@ref MIDI_Sender) will never send messages addressed to an invalid address.
struct __attribute__((packed)) RawMIDIAddress {
bool valid : 1;
Expand All @@ -17,9 +17,9 @@ struct __attribute__((packed)) RawMIDIAddress {
uint8_t cableNumber : 4;
};

/// A class for saving a MIDI channel and cable number.
/// A MIDI channel and cable number can be marked "invalid".
/// The MIDI sending functions (@ref MIDI_Sender) will never send messages
/// A class for saving a MIDI channel and cable number.
/// A MIDI channel and cable number can be marked "invalid".
/// The MIDI sending functions (@ref MIDI_Sender) will never send messages
/// addressed to invalid channels or cables.
class MIDIChannelCable {
friend class MIDIAddress;
Expand All @@ -30,12 +30,7 @@ class MIDIChannelCable {

constexpr MIDIChannelCable() : addresses{0, 0, 0, 0} {}
constexpr MIDIChannelCable(Channel channel, Cable cableNumber = CABLE_1)
: addresses{
1,
0,
channel.getRaw(),
cableNumber.getRaw(),
} {}
: addresses{1, 0, channel.getRaw(), cableNumber.getRaw()} {}

constexpr static MIDIChannelCable invalid() { return {}; }

Expand Down Expand Up @@ -110,9 +105,6 @@ class MIDIChannelCable {
RawMIDIAddress addresses;
};

/// @deprecated
using MIDICNChannel [[deprecated("Use MIDIChannelCable instead")]] = MIDIChannelCable;

/// A class for saving an offset to a MIDI address.
/// It can be added to a MIDIAddress.
class RelativeMIDIAddress {
Expand Down Expand Up @@ -141,8 +133,8 @@ class RelativeMIDIAddress {
};

/// A type-safe utility class for saving a MIDI address consisting of a 7-bit
/// address, a 4-bit channel, and a 4-bit cable number.
/// A MIDI address can be marked "invalid". The MIDI sending functions
/// address, a 4-bit channel, and a 4-bit cable number.
/// A MIDI address can be marked "invalid". The MIDI sending functions
/// (@ref MIDI_Sender) will never send messages addressed to invalid addresses.
///
/// See @ref md_pages_Basics "this page" for a tutorial on how to use MIDI
Expand Down Expand Up @@ -359,8 +351,4 @@ class MIDIAddress {
RawMIDIAddress addresses;
};

/// @deprecated
using MIDICNChannelAddress [[deprecated("Use MIDIAddress instead")]] =
MIDIAddress;

END_CS_NAMESPACE

0 comments on commit e64592f

Please sign in to comment.