util/Macros: replace with std::size() (C++17)

This commit is contained in:
Max Kellermann
2019-08-03 13:10:49 +02:00
parent d305f187d5
commit cde6c46d2f
27 changed files with 84 additions and 115 deletions

View File

@@ -41,7 +41,6 @@
#include "Instance.hxx"
#include "client/Client.hxx"
#include "client/Response.hxx"
#include "util/Macros.hxx"
#include "util/Tokenizer.hxx"
#include "util/StringAPI.hxx"
@@ -49,6 +48,8 @@
#include "StickerCommands.hxx"
#endif
#include <iterator>
#include <assert.h>
#include <string.h>
@@ -208,7 +209,7 @@ static constexpr struct command commands[] = {
{ "volume", PERMISSION_CONTROL, 1, 1, handle_volume },
};
static constexpr unsigned num_commands = ARRAY_SIZE(commands);
static constexpr unsigned num_commands = std::size(commands);
static bool
command_available(gcc_unused const Partition &partition,