From a0c62ff0db4c0a2ac2ad33bf5b7088203c9a1c03 Mon Sep 17 00:00:00 2001 From: Michael Richters Date: Thu, 24 Feb 2022 11:22:54 -0600 Subject: [PATCH] Force some OneShot functions inline These declarations save some PROGMEM (and probably make things run very slightly faster). Signed-off-by: Michael Richters --- .../Kaleidoscope-OneShot/src/kaleidoscope/plugin/OneShot.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/Kaleidoscope-OneShot/src/kaleidoscope/plugin/OneShot.cpp b/plugins/Kaleidoscope-OneShot/src/kaleidoscope/plugin/OneShot.cpp index 38dc1472..bbb2e323 100644 --- a/plugins/Kaleidoscope-OneShot/src/kaleidoscope/plugin/OneShot.cpp +++ b/plugins/Kaleidoscope-OneShot/src/kaleidoscope/plugin/OneShot.cpp @@ -89,6 +89,7 @@ bool OneShot::isStickable(Key key) const { return isStickableDefault(key); } +__attribute__((always_inline)) inline bool OneShot::isStickableDefault(Key key) const { int8_t n; // If the key is either a keyboard modifier or a layer shift, we check to see @@ -369,6 +370,7 @@ void OneShot::holdKey(KeyAddr key_addr) const { Runtime.handleKeyEvent(event); } +__attribute__((always_inline)) inline void OneShot::releaseKey(KeyAddr key_addr) { glue_addrs_.clear(key_addr); temp_addrs_.clear(key_addr);