mirror of
https://github.com/labwc/labwc.git
synced 2025-11-02 09:01:47 -05:00
Add ARRAY_SIZE() macro
This commit is contained in:
parent
ae676c1607
commit
8d3b15576b
8 changed files with 30 additions and 12 deletions
|
|
@ -7,6 +7,7 @@
|
|||
#include <wlr/types/wlr_primary_selection.h>
|
||||
#include <wlr/util/region.h>
|
||||
#include "action.h"
|
||||
#include "common/array-size.h"
|
||||
#include "common/mem.h"
|
||||
#include "common/scene-helpers.h"
|
||||
#include "config/mousebind.h"
|
||||
|
|
@ -51,14 +52,12 @@ static const char * const cursors_x11[] = {
|
|||
"left_side"
|
||||
};
|
||||
|
||||
#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
|
||||
static_assert(
|
||||
ARRAY_SIZE(cursors_xdg) == LAB_CURSOR_COUNT,
|
||||
"XDG cursor names are out of sync");
|
||||
static_assert(
|
||||
ARRAY_SIZE(cursors_x11) == LAB_CURSOR_COUNT,
|
||||
"X11 cursor names are out of sync");
|
||||
#undef ARRAY_SIZE
|
||||
|
||||
enum lab_cursors
|
||||
cursor_get_from_edge(uint32_t resize_edges)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue