Replace defines by constexpr variables

Several define directives could be replaced by constexpr variable
definitions. This adds type safety with no overhead costs.

Signed-off-by: Max Görner <max@familie-goerner.eu>
pull/365/head
Max Görner 6 years ago
parent 49464bbaa6
commit 0c1e874d74

@ -19,11 +19,11 @@
#include "Kaleidoscope-LEDEffect-Rainbow.h" #include "Kaleidoscope-LEDEffect-Rainbow.h"
#define CHATTER_CYCLE_LIMIT 30 constexpr uint8_t CHATTER_CYCLE_LIMIT = 30;
#define TOGGLED_OFF 2 constexpr uint8_t TOGGLED_OFF = 2;
#define TOGGLED_ON 1 constexpr uint8_t TOGGLED_ON = 1;
#define HELD 3 constexpr uint8_t HELD = 3;
#define RELEASED 0 constexpr uint8_t RELEASED = 0;
kaleidoscope::EventHandlerResult TestMode_::beforeReportingState() { kaleidoscope::EventHandlerResult TestMode_::beforeReportingState() {

Loading…
Cancel
Save