diff options
author | Max Kellermann <max@duempel.org> | 2013-10-15 22:04:17 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-15 22:47:39 +0200 |
commit | 509f8dab8946cfc311def89f62352c0881e73348 (patch) | |
tree | 913fbb714704bcffc0ca6b8f44cdfb293ec9ee24 /src/UpdateQueue.cxx | |
parent | 77429b6dd35e23efac92630bab35d935b9496345 (diff) | |
download | mpd-509f8dab8946cfc311def89f62352c0881e73348.tar.gz mpd-509f8dab8946cfc311def89f62352c0881e73348.tar.xz mpd-509f8dab8946cfc311def89f62352c0881e73348.zip |
Util/Macros: replacement for GLib's G_N_ELEMENTS()
Diffstat (limited to 'src/UpdateQueue.cxx')
-rw-r--r-- | src/UpdateQueue.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
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 <glib.h> @@ -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); |