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

@@ -22,7 +22,8 @@
#include "util/FormatString.hxx"
#include "util/AllocatedString.hxx"
#include "util/TruncateString.hxx"
#include "util/Macros.hxx"
#include <iterator>
#include <string.h>
@@ -97,7 +98,7 @@ icy_server_metadata_page(const Tag &tag, const TagType *types) noexcept
// Length + Metadata - "StreamTitle='';StreamUrl='';" = 4081 - 28
char stream_title[(1 + 255 - 28) * 16];
char *p = stream_title, *const end = stream_title + ARRAY_SIZE(stream_title);
char *p = stream_title, *const end = stream_title + std::size(stream_title);
stream_title[0] = '\0';
while (p < end && item <= last_item) {