aboutsummaryrefslogtreecommitdiffstats
path: root/src/command/AllCommands.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-12-09 21:58:01 +0100
committerMax Kellermann <max@duempel.org>2014-12-09 21:58:01 +0100
commit900c4977cc5e51fe541eb21847ebeaf9daa6d165 (patch)
tree123732323ce65704e95ea822ffad8b8ae5fe0570 /src/command/AllCommands.cxx
parentbb39fffab9734c9d1ee88ac465bbb47bda4f64bb (diff)
downloadmpd-900c4977cc5e51fe541eb21847ebeaf9daa6d165.tar.gz
mpd-900c4977cc5e51fe541eb21847ebeaf9daa6d165.tar.xz
mpd-900c4977cc5e51fe541eb21847ebeaf9daa6d165.zip
AllCommands: use ARRAY_SIZE()
Diffstat (limited to 'src/command/AllCommands.cxx')
-rw-r--r--src/command/AllCommands.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/command/AllCommands.cxx b/src/command/AllCommands.cxx
index e5519c4c3..e0b16d77d 100644
--- a/src/command/AllCommands.cxx
+++ b/src/command/AllCommands.cxx
@@ -35,6 +35,7 @@
#include "protocol/Result.hxx"
#include "Partition.hxx"
#include "client/Client.hxx"
+#include "util/Macros.hxx"
#include "util/Tokenizer.hxx"
#include "util/Error.hxx"
#include "util/ConstBuffer.hxx"
@@ -195,7 +196,7 @@ static constexpr struct command commands[] = {
{ "volume", PERMISSION_CONTROL, 1, 1, handle_volume },
};
-static const unsigned num_commands = sizeof(commands) / sizeof(commands[0]);
+static constexpr unsigned num_commands = ARRAY_SIZE(commands);
static bool
command_available(gcc_unused const Partition &partition,