From 096925eac082f34b207b445fa49269fb9fd888d8 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Mon, 28 Nov 2016 08:04:01 +0100 Subject: [PATCH] MouseKeys: Make MouseKeys static When we mark a symbol extern, but do not reference it anywhere else directly, it will not be compiled in when using dot_a_linkage. For this reason, make MouseKeys a static variable instead of extern. Signed-off-by: Gergely Nagy --- libraries/Keyboardio-MouseKeys/src/Keyboardio-MouseKeys.cpp | 2 -- libraries/Keyboardio-MouseKeys/src/Keyboardio-MouseKeys.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/libraries/Keyboardio-MouseKeys/src/Keyboardio-MouseKeys.cpp b/libraries/Keyboardio-MouseKeys/src/Keyboardio-MouseKeys.cpp index c0098279..b788587a 100644 --- a/libraries/Keyboardio-MouseKeys/src/Keyboardio-MouseKeys.cpp +++ b/libraries/Keyboardio-MouseKeys/src/Keyboardio-MouseKeys.cpp @@ -56,5 +56,3 @@ static bool handleMouseKeys(Key mappedKey, byte row, byte col, uint8_t keyState) MouseKeys_::MouseKeys_(void) { event_handler_hook_add (handleMouseKeys); } - -MouseKeys_ MouseKeys; diff --git a/libraries/Keyboardio-MouseKeys/src/Keyboardio-MouseKeys.h b/libraries/Keyboardio-MouseKeys/src/Keyboardio-MouseKeys.h index a9846980..00ac6ef1 100644 --- a/libraries/Keyboardio-MouseKeys/src/Keyboardio-MouseKeys.h +++ b/libraries/Keyboardio-MouseKeys/src/Keyboardio-MouseKeys.h @@ -7,4 +7,4 @@ class MouseKeys_ { MouseKeys_ (void); }; -extern MouseKeys_ MouseKeys; +static MouseKeys_ MouseKeys;