From d993f8a3a1e278d7d32ca579415c4d0d4fb6600f Mon Sep 17 00:00:00 2001 From: Axel Wagner Date: Sat, 19 Mar 2011 20:58:05 +0100 Subject: [PATCH] Auto-update NUM_ATOMS by putting it into the enum (thx sECuRE) --- i3bar/src/xcb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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]; -- 2.39.5