From b0586f3fc8645f3ea41ded9469f727b74dbd0cc8 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Thu, 1 Oct 2020 10:18:42 +0200 Subject: [PATCH] DynamicMacros: Stop using the `using namespace` directive Since there's only two places where we use the `kaleidoscope::ranges` namespace, and it's easy to use `ranges::` there, instead of the bare enum, lets do that, and make cpplint happier. Signed-off-by: Gergely Nagy --- src/kaleidoscope/plugin/DynamicMacros.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/kaleidoscope/plugin/DynamicMacros.cpp b/src/kaleidoscope/plugin/DynamicMacros.cpp index 7870fd7f..db91ae3d 100644 --- a/src/kaleidoscope/plugin/DynamicMacros.cpp +++ b/src/kaleidoscope/plugin/DynamicMacros.cpp @@ -19,8 +19,6 @@ #include "kaleidoscope/keyswitch_state.h" #include "kaleidoscope/key_events.h" -using namespace kaleidoscope::ranges; - namespace kaleidoscope { namespace plugin { @@ -200,11 +198,11 @@ void DynamicMacros::play(uint8_t macro_id) { } EventHandlerResult DynamicMacros::onKeyswitchEvent(Key &mappedKey, KeyAddr key_addr, uint8_t keyState) { - if (mappedKey.getRaw() < DYNAMIC_MACRO_FIRST || mappedKey.getRaw() > DYNAMIC_MACRO_LAST) + if (mappedKey.getRaw() < ranges::DYNAMIC_MACRO_FIRST || mappedKey.getRaw() > ranges::DYNAMIC_MACRO_LAST) return EventHandlerResult::OK; if (keyToggledOn(keyState)) { - play(mappedKey.getRaw() - DYNAMIC_MACRO_FIRST); + play(mappedKey.getRaw() - ranges::DYNAMIC_MACRO_FIRST); } return EventHandlerResult::EVENT_CONSUMED;