From 509f8dab8946cfc311def89f62352c0881e73348 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 15 Oct 2013 22:04:17 +0200 Subject: Util/Macros: replacement for GLib's G_N_ELEMENTS() --- src/UpdateQueue.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/UpdateQueue.cxx') diff --git a/src/UpdateQueue.cxx b/src/UpdateQueue.cxx index 85eb22358..9479e76f5 100644 --- a/src/UpdateQueue.cxx +++ b/src/UpdateQueue.cxx @@ -19,6 +19,7 @@ #include "config.h" #include "UpdateQueue.hxx" +#include "util/Macros.hxx" #include @@ -36,9 +37,9 @@ static size_t update_queue_length; unsigned update_queue_push(const char *path, bool discard, unsigned base) { - assert(update_queue_length <= G_N_ELEMENTS(update_queue)); + assert(update_queue_length <= ARRAY_SIZE(update_queue)); - if (update_queue_length == G_N_ELEMENTS(update_queue)) + if (update_queue_length == ARRAY_SIZE(update_queue)) return 0; update_queue[update_queue_length].path = g_strdup(path); -- cgit v1.2.3