mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
box-drawing: use enum constants in draw_sextant() instead of #define
Both are functionally equivalent here, but the former is also properly scoped, can be naturally indented and has a less repetitive syntax.
This commit is contained in:
parent
c0a3f89775
commit
dad0549f2e
1 changed files with 8 additions and 6 deletions
|
|
@ -1765,12 +1765,14 @@ draw_sextant(wchar_t wc, struct buf *buf)
|
|||
* 4 middle right
|
||||
* 5 lower right
|
||||
*/
|
||||
#define UPPER_LEFT (1 << 0)
|
||||
#define MIDDLE_LEFT (1 << 1)
|
||||
#define LOWER_LEFT (1 << 2)
|
||||
#define UPPER_RIGHT (1 << 3)
|
||||
#define MIDDLE_RIGHT (1 << 4)
|
||||
#define LOWER_RIGHT (1 << 5)
|
||||
enum {
|
||||
UPPER_LEFT = 1 << 0,
|
||||
MIDDLE_LEFT = 1 << 1,
|
||||
LOWER_LEFT = 1 << 2,
|
||||
UPPER_RIGHT = 1 << 3,
|
||||
MIDDLE_RIGHT = 1 << 4,
|
||||
LOWER_RIGHT = 1 << 5,
|
||||
};
|
||||
|
||||
static const uint8_t matrix[60] = {
|
||||
/* U+1fb00 - U+1fb0f */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue