Auto-update NUM_ATOMS by putting it into the enum (thx sECuRE)
This commit is contained in:
parent
5219493ffe
commit
d993f8a3a1
|
@ -27,11 +27,10 @@
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
/* We save the Atoms in an easy to access array, indexed by an enum */
|
/* We save the Atoms in an easy to access array, indexed by an enum */
|
||||||
#define NUM_ATOMS 3
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
#define ATOM_DO(name) name,
|
#define ATOM_DO(name) name,
|
||||||
#include "xcb_atoms.def"
|
#include "xcb_atoms.def"
|
||||||
|
NUM_ATOMS
|
||||||
};
|
};
|
||||||
|
|
||||||
xcb_intern_atom_cookie_t atom_cookies[NUM_ATOMS];
|
xcb_intern_atom_cookie_t atom_cookies[NUM_ATOMS];
|
||||||
|
|
Loading…
Reference in New Issue