From 61b64bb82a93c6d1441f07655a5e20b59a15fd29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Thu, 16 Jul 2020 14:27:55 +0200 Subject: Redefine IS_LAYER_ON/OFF() as aliases for existing layer functions (#6352) * Add IS_LAYER_ON_STATE()/IS_LAYER_OFF_STATE() macros * Add docs for IS_LAYER_ON/OFF(_STATE) macros * Remove IS_LAYER_ON/OFF_STATE redefinition in userspace * Run clang-format on quantum/quantum.h * Redefine IS_LAYER_ON/OFF(_STATE) as aliases of existing layer functions Also update relevant doc entries. Needs testing to check if this breaks existing IS_LAYER_ON/OFF usage in certain edge cases (namely calling the macros with 0). * Reformat layer check function docs --- users/konstantin/konstantin.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'users/konstantin') diff --git a/users/konstantin/konstantin.h b/users/konstantin/konstantin.h index 72a1616238..249b3fe15b 100644 --- a/users/konstantin/konstantin.h +++ b/users/konstantin/konstantin.h @@ -48,9 +48,6 @@ #define LCT_CPS LCTL_T(KC_CAPS) #define RSF_SLS RSFT_T(KC_SLSH) -#define IS_LAYER_ON_STATE(state, layer) ( (state) & (1UL << (layer))) -#define IS_LAYER_OFF_STATE(state, layer) (~(state) & (1UL << (layer))) - // Clear mods, perform action, restore mods #define CLEAN_MODS(action) { \ uint8_t mods = get_mods(); \ -- cgit v1.2.1