mirror of
https://github.com/swaywm/sway.git
synced 2026-04-29 06:46:22 -04:00
use standard ARRAY_SIZE() macro
Replace all the custom `sizeof(array)/sizeof(element)` and `sizeof(array)/sizeof(type)` with the standard macro ARRAY_SIZE().
This commit is contained in:
parent
5f8676f214
commit
021933f735
14 changed files with 33 additions and 23 deletions
|
|
@ -6,6 +6,8 @@
|
|||
#include <sys/types.h>
|
||||
#include <xkbcommon/xkbcommon.h>
|
||||
|
||||
#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a)[0])
|
||||
|
||||
/**
|
||||
* Wrap i into the range [0, max[
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue