aboutsummaryrefslogtreecommitdiffstats
path: root/src/config
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-12-09 22:04:34 +0100
committerMax Kellermann <max@duempel.org>2014-12-09 22:04:34 +0100
commit5f4252bcd2293597c331d24b6f13bd59b6afb145 (patch)
treec30032bbf517a5674676d7967893e8b155d27a13 /src/config
parenta588aef921610b92e0a5c7e410617dc594ac39a1 (diff)
downloadmpd-5f4252bcd2293597c331d24b6f13bd59b6afb145.tar.gz
mpd-5f4252bcd2293597c331d24b6f13bd59b6afb145.tar.xz
mpd-5f4252bcd2293597c331d24b6f13bd59b6afb145.zip
ConfigTemplates: use ARRAY_SIZE()
Diffstat (limited to 'src/config')
-rw-r--r--src/config/ConfigTemplates.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/config/ConfigTemplates.cxx b/src/config/ConfigTemplates.cxx
index 58ee56425..801ee8b20 100644
--- a/src/config/ConfigTemplates.cxx
+++ b/src/config/ConfigTemplates.cxx
@@ -19,6 +19,7 @@
#include "ConfigTemplates.hxx"
#include "ConfigOption.hxx"
+#include "util/Macros.hxx"
#include <string.h>
@@ -81,8 +82,7 @@ const ConfigTemplate config_templates[] = {
{ "neighbors", true, true },
};
-static constexpr unsigned n_config_templates =
- sizeof(config_templates) / sizeof(config_templates[0]);
+static constexpr unsigned n_config_templates = ARRAY_SIZE(config_templates);
static_assert(n_config_templates == unsigned(CONF_MAX),
"Wrong number of config_templates");