Auto-update NUM_ATOMS by putting it into the enum (thx sECuRE)

This commit is contained in:
Axel Wagner 2011-03-19 20:58:05 +01:00
parent 5219493ffe
commit d993f8a3a1
1 changed files with 1 additions and 2 deletions

View File

@ -27,11 +27,10 @@
#include "common.h"
/* We save the Atoms in an easy to access array, indexed by an enum */
#define NUM_ATOMS 3
enum {
#define ATOM_DO(name) name,
#include "xcb_atoms.def"
NUM_ATOMS
};
xcb_intern_atom_cookie_t atom_cookies[NUM_ATOMS];