Skip to content

Commit 3dc0f30

Browse files
author
Francois Best
committed
Removed compile flags and last preprocessor settings.
1 parent b1b978d commit 3dc0f30

File tree

2 files changed

+12
-23
lines changed

2 files changed

+12
-23
lines changed

src/MIDI.hpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ template<class SerialPort, class Settings>
3030
inline MidiInterface<SerialPort, Settings>::MidiInterface(SerialPort& inSerial)
3131
: mSerial(inSerial)
3232
{
33-
#if MIDI_BUILD_INPUT && MIDI_USE_CALLBACKS
3433
mNoteOffCallback = 0;
3534
mNoteOnCallback = 0;
3635
mAfterTouchPolyCallback = 0;
@@ -49,7 +48,6 @@ inline MidiInterface<SerialPort, Settings>::MidiInterface(SerialPort& inSerial)
4948
mStopCallback = 0;
5049
mActiveSensingCallback = 0;
5150
mSystemResetCallback = 0;
52-
#endif
5351
}
5452

5553
/*! \brief Destructor for MidiInterface.
@@ -476,7 +474,7 @@ inline bool MidiInterface<SerialPort, Settings>::read(Channel inChannel)
476474
handleNullVelocityNoteOnAsNoteOff();
477475
const bool channelMatch = inputFilter(inChannel);
478476

479-
if (MIDI_USE_CALLBACKS && channelMatch)
477+
if (channelMatch)
480478
{
481479
launchCallback();
482480
}
@@ -616,15 +614,17 @@ bool MidiInterface<SerialPort, Settings>::parse()
616614
mPendingMessageIndex++;
617615
}
618616

619-
#if USE_1BYTE_PARSING
620-
// Message is not complete.
621-
return false;
622-
#else
623-
// Call the parser recursively
624-
// to parse the rest of the message.
625-
return parse();
626-
#endif
627-
617+
if (Settings::Use1ByteParsing)
618+
{
619+
// Message is not complete.
620+
return false;
621+
}
622+
else
623+
{
624+
// Call the parser recursively
625+
// to parse the rest of the message.
626+
return parse();
627+
}
628628
}
629629
else
630630
{

src/midi_Settings.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,6 @@
2525

2626
#include "midi_Defs.h"
2727

28-
// Compilation flags. Set them to 1 to build the associated feature
29-
// (MIDI in, out, thru), or to 0 to disable the feature and save space.
30-
// Note that thru can work only if input and output are enabled.
31-
32-
#define MIDI_BUILD_INPUT 1
33-
#define MIDI_BUILD_OUTPUT 1
34-
#define MIDI_BUILD_THRU 1
35-
#define MIDI_USE_CALLBACKS 1
36-
37-
// -----------------------------------------------------------------------------
38-
3928
BEGIN_MIDI_NAMESPACE
4029

4130
/*! \brief Default Settings Traits struct

0 commit comments

Comments
 (0)