Skip to content

Commit

Permalink
Forwarding GenericUSBMIDI_Interface constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
tttapa committed Mar 30, 2024
1 parent 370bbef commit dbf5376
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/MIDI_Interfaces/USBMIDI_Interface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,15 @@ class GenericUSBMIDI_Interface : public MIDI_Interface {
*/
template <class... Args>
GenericUSBMIDI_Interface(Args &&...args)
: backend(std::forward<Args>(args)...),
: backend {std::forward<Args>(args)...},
alwaysSendImmediately_(backend.preferImmediateSend()) {}

GenericUSBMIDI_Interface(const GenericUSBMIDI_Interface &) = delete;
GenericUSBMIDI_Interface(GenericUSBMIDI_Interface &&) = delete;
GenericUSBMIDI_Interface &
operator=(const GenericUSBMIDI_Interface &) = delete;
GenericUSBMIDI_Interface &operator=(GenericUSBMIDI_Interface &&) = delete;

private:
// MIDI send implementations
void sendChannelMessageImpl(ChannelMessage) override;
Expand Down Expand Up @@ -158,8 +164,9 @@ BEGIN_CS_NAMESPACE
class USBMIDI_Interface
: public GenericUSBMIDI_Interface<USBDeviceMIDIBackend> {
public:
USBMIDI_Interface() = default;
using MIDIUSBPacket_t = USBDeviceMIDIBackend::MIDIUSBPacket_t;
using backend_t = USBDeviceMIDIBackend;
using GenericUSBMIDI_Interface<backend_t>::GenericUSBMIDI_Interface;
using MIDIUSBPacket_t = backend_t::MIDIUSBPacket_t;
};

END_CS_NAMESPACE
Expand Down

0 comments on commit dbf5376

Please sign in to comment.