summaryrefslogtreecommitdiff
path: root/src/config
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2019-08-03 13:10:49 +0200
committerMax Kellermann <max@musicpd.org>2019-08-03 13:10:49 +0200
commitcde6c46d2fff083166c3aca7fbf07df737c07cdc (patch)
tree51c5706d03b6ea61fa6dad6566dfa67bc090efda /src/config
parentd305f187d5268a040aca6df62849c33b05308963 (diff)
util/Macros: replace with std::size() (C++17)
Diffstat (limited to 'src/config')
-rw-r--r--src/config/Templates.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/config/Templates.cxx b/src/config/Templates.cxx
index 0641b03bb..01205c3d0 100644
--- a/src/config/Templates.cxx
+++ b/src/config/Templates.cxx
@@ -19,7 +19,8 @@
#include "Templates.hxx"
#include "Option.hxx"
-#include "util/Macros.hxx"
+
+#include <iterator>
#include <string.h>
@@ -77,7 +78,7 @@ const ConfigTemplate config_param_templates[] = {
};
static constexpr unsigned n_config_param_templates =
- ARRAY_SIZE(config_param_templates);
+ std::size(config_param_templates);
static_assert(n_config_param_templates == unsigned(ConfigOption::MAX),
"Wrong number of config_param_templates");
@@ -95,7 +96,7 @@ const ConfigTemplate config_block_templates[] = {
};
static constexpr unsigned n_config_block_templates =
- ARRAY_SIZE(config_block_templates);
+ std::size(config_block_templates);
static_assert(n_config_block_templates == unsigned(ConfigBlockOption::MAX),
"Wrong number of config_block_templates");