aboutsummaryrefslogtreecommitdiffstats
path: root/src/DecoderList.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-15 22:04:17 +0200
committerMax Kellermann <max@duempel.org>2013-10-15 22:47:39 +0200
commit509f8dab8946cfc311def89f62352c0881e73348 (patch)
tree913fbb714704bcffc0ca6b8f44cdfb293ec9ee24 /src/DecoderList.cxx
parent77429b6dd35e23efac92630bab35d935b9496345 (diff)
downloadmpd-509f8dab8946cfc311def89f62352c0881e73348.tar.gz
mpd-509f8dab8946cfc311def89f62352c0881e73348.tar.xz
mpd-509f8dab8946cfc311def89f62352c0881e73348.zip
Util/Macros: replacement for GLib's G_N_ELEMENTS()
Diffstat (limited to 'src/DecoderList.cxx')
-rw-r--r--src/DecoderList.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/DecoderList.cxx b/src/DecoderList.cxx
index fd80514dd..0cdcc07ae 100644
--- a/src/DecoderList.cxx
+++ b/src/DecoderList.cxx
@@ -43,8 +43,7 @@
#include "decoder/MpcdecDecoderPlugin.hxx"
#include "decoder/FluidsynthDecoderPlugin.hxx"
#include "system/FatalError.hxx"
-
-#include <glib.h>
+#include "util/Macros.hxx"
#include <string.h>
@@ -114,9 +113,8 @@ const struct decoder_plugin *const decoder_plugins[] = {
NULL
};
-enum {
- num_decoder_plugins = G_N_ELEMENTS(decoder_plugins) - 1,
-};
+static constexpr unsigned num_decoder_plugins =
+ ARRAY_SIZE(decoder_plugins) - 1;
/** which plugins have been initialized successfully? */
bool decoder_plugins_enabled[num_decoder_plugins];