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 <algernon@keyboard.io>
pull/911/head
Gergely Nagy 4 years ago
parent ab535fc039
commit b0586f3fc8
No known key found for this signature in database
GPG Key ID: AC1E90BAC433F68F

@ -19,8 +19,6 @@
#include "kaleidoscope/keyswitch_state.h" #include "kaleidoscope/keyswitch_state.h"
#include "kaleidoscope/key_events.h" #include "kaleidoscope/key_events.h"
using namespace kaleidoscope::ranges;
namespace kaleidoscope { namespace kaleidoscope {
namespace plugin { namespace plugin {
@ -200,11 +198,11 @@ void DynamicMacros::play(uint8_t macro_id) {
} }
EventHandlerResult DynamicMacros::onKeyswitchEvent(Key &mappedKey, KeyAddr key_addr, uint8_t keyState) { 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; return EventHandlerResult::OK;
if (keyToggledOn(keyState)) { if (keyToggledOn(keyState)) {
play(mappedKey.getRaw() - DYNAMIC_MACRO_FIRST); play(mappedKey.getRaw() - ranges::DYNAMIC_MACRO_FIRST);
} }
return EventHandlerResult::EVENT_CONSUMED; return EventHandlerResult::EVENT_CONSUMED;

Loading…
Cancel
Save