mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-22 16:32:13 -07:00
Add STRIP_BUTTON_MODIFIERS() macro to refactor modifier flag stripping.
There are many places in the code which use the (x & ~MOD_MASK) idiom. This new macro makes possible their refactoring in the future.
This commit is contained in:

committed by
Simon Tatham

parent
fd304c53cc
commit
894115ad3d
@ -72,6 +72,7 @@ enum {
|
||||
(m) == CURSOR_RIGHT || (m) == CURSOR_LEFT )
|
||||
#define IS_CURSOR_SELECT(m) ( (m) == CURSOR_SELECT || (m) == CURSOR_SELECT2)
|
||||
#define IS_UI_FAKE_KEY(m) ( (m) > UI_LOWER_BOUND && (m) < UI_UPPER_BOUND )
|
||||
#define STRIP_BUTTON_MODIFIERS(m) ( (unsigned)(m) & ~MOD_MASK )
|
||||
|
||||
/*
|
||||
* Flags in the back end's `flags' word.
|
||||
|
Reference in New Issue
Block a user