From: Axel Wagner Date: Sat, 19 Mar 2011 19:58:05 +0000 (+0100) Subject: Auto-update NUM_ATOMS by putting it into the enum (thx sECuRE) X-Git-Tag: 4.0.1~7^2~3^2~21 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d993f8a3a1e278d7d32ca579415c4d0d4fb6600f;p=i3%2Fi3 Auto-update NUM_ATOMS by putting it into the enum (thx sECuRE) --- diff --git a/i3bar/src/xcb.c b/i3bar/src/xcb.c index a7f1e51b..5f4c58f7 100644 --- a/i3bar/src/xcb.c +++ b/i3bar/src/xcb.c @@ -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];