From: tmk Date: Thu, 21 Nov 2013 14:23:57 +0000 (+0900) Subject: Add parenthses ito macro arguments X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=4e5bce22deeee879d063f8e4fa8fe7aa087bd57e;p=max%2Ftmk_keyboard.git Add parenthses ito macro arguments --- diff --git a/common/action_code.h b/common/action_code.h index c153838f..b08d3612 100644 --- a/common/action_code.h +++ b/common/action_code.h @@ -207,10 +207,10 @@ enum mods_codes { MODS_ONESHOT = 0x00, }; #define ACTION_KEY(key) ACTION(ACT_MODS, (key)) -#define ACTION_MODS(mods) ACTION(ACT_MODS, (mods&0x1f)<<8 | 0) -#define ACTION_MODS_KEY(mods, key) ACTION(ACT_MODS, (mods&0x1f)<<8 | (key)) -#define ACTION_MODS_TAP_KEY(mods, key) ACTION(ACT_MODS_TAP, (mods&0x1f)<<8 | (key)) -#define ACTION_MODS_ONESHOT(mods) ACTION(ACT_MODS_TAP, (mods&0x1f)<<8 | MODS_ONESHOT) +#define ACTION_MODS(mods) ACTION(ACT_MODS, ((mods)&0x1f)<<8 | 0) +#define ACTION_MODS_KEY(mods, key) ACTION(ACT_MODS, ((mods)&0x1f)<<8 | (key)) +#define ACTION_MODS_TAP_KEY(mods, key) ACTION(ACT_MODS_TAP, ((mods)&0x1f)<<8 | (key)) +#define ACTION_MODS_ONESHOT(mods) ACTION(ACT_MODS_TAP, ((mods)&0x1f)<<8 | MODS_ONESHOT) /*