diff options
author | June McEnroe <june@causal.agency> | 2018-04-09 00:41:52 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2018-04-09 00:41:52 -0400 |
commit | e3187c579eb69335ed42c7cd7ec30000e0dc3fe1 (patch) | |
tree | ff89477fde29bbc276f9e8b920f1d6f356ac6559 /bin/klon.c | |
parent | static_assert PNG header size in pngo and glitch (diff) | |
download | src-e3187c579eb69335ed42c7cd7ec30000e0dc3fe1.tar.gz src-e3187c579eb69335ed42c7cd7ec30000e0dc3fe1.zip |
Use enum instead of #define for some constants
Diffstat (limited to '')
-rw-r--r-- | bin/klon.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/bin/klon.c b/bin/klon.c index 40469290..9d82d88c 100644 --- a/bin/klon.c +++ b/bin/klon.c @@ -25,11 +25,13 @@ typedef uint8_t Card; -#define MASK_RANK (0x0F) -#define MASK_SUIT (0x30) -#define MASK_COLOR (0x10) -#define MASK_UP (0x40) -#define MASK_SELECT (0x80) +enum { + MASK_RANK = 0x0F, + MASK_SUIT = 0x30, + MASK_COLOR = 0x10, + MASK_UP = 0x40, + MASK_SELECT = 0x80, +}; enum { SUIT_CLUB = 0x00, |