From 48ce259ae5ee5b5e93a6fd05ec0e379e490ba60d Mon Sep 17 00:00:00 2001 From: Michael Richters Date: Tue, 22 Mar 2022 00:02:14 -0500 Subject: [PATCH] Replace LEDControl key constant `#define`s with `constexpr`s Signed-off-by: Michael Richters --- src/kaleidoscope/plugin/LEDControl.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/kaleidoscope/plugin/LEDControl.h b/src/kaleidoscope/plugin/LEDControl.h index a3f04b6e..2b119922 100644 --- a/src/kaleidoscope/plugin/LEDControl.h +++ b/src/kaleidoscope/plugin/LEDControl.h @@ -19,11 +19,11 @@ #include "kaleidoscope/Runtime.h" #include "kaleidoscope/plugin/LEDMode.h" -#define LED_TOGGLE 0b00000001 // Synthetic, internal +constexpr uint8_t LED_TOGGLE = 0b00000001; // Synthetic, internal -#define Key_LEDEffectNext Key(0, KEY_FLAGS | SYNTHETIC | IS_INTERNAL | LED_TOGGLE) -#define Key_LEDEffectPrevious Key(1, KEY_FLAGS | SYNTHETIC | IS_INTERNAL | LED_TOGGLE) -#define Key_LEDToggle Key(2, KEY_FLAGS | SYNTHETIC | IS_INTERNAL | LED_TOGGLE) +constexpr Key Key_LEDEffectNext = Key(0, KEY_FLAGS | SYNTHETIC | IS_INTERNAL | LED_TOGGLE); +constexpr Key Key_LEDEffectPrevious = Key(1, KEY_FLAGS | SYNTHETIC | IS_INTERNAL | LED_TOGGLE); +constexpr Key Key_LEDToggle = Key(2, KEY_FLAGS | SYNTHETIC | IS_INTERNAL | LED_TOGGLE); namespace kaleidoscope { namespace plugin {