From 0dd2ca17d895804a836243f8bc586dbf71f6c262 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Sat, 5 Jun 2021 12:04:54 -0700 Subject: [PATCH] Shave 20 bytes by foricing isKeyboardModifier inline --- src/kaleidoscope/key_defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kaleidoscope/key_defs.h b/src/kaleidoscope/key_defs.h index ef8358f3..0c5c26fb 100644 --- a/src/kaleidoscope/key_defs.h +++ b/src/kaleidoscope/key_defs.h @@ -195,7 +195,7 @@ class Key { // modifier keys like `LSHIFT(Key_RightAlt)` and `Key_Meh`. It will not match // a key with only modifier flags (e.g. `LCTRL(RALT(Key_NoKey))`); this is an // intentional feature so that plugins can distinguish between the two. - constexpr bool isKeyboardModifier() const { + constexpr bool __attribute__((always_inline)) isKeyboardModifier() const { return (isKeyboardKey() && (keyCode_ >= HID_KEYBOARD_FIRST_MODIFIER && keyCode_ <= HID_KEYBOARD_LAST_MODIFIER));