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

@@ -23,10 +23,10 @@
#include "mixer/MixerList.hxx"
#include "fs/AllocatedPath.hxx"
#include "util/RuntimeError.hxx"
#include "util/Macros.hxx"
#include "util/StringCompare.hxx"
#include <array>
#include <iterator>
#include <stdlib.h>
#include <string.h>
@@ -86,7 +86,7 @@ MakeWaveOutError(MMRESULT result, const char *prefix)
{
char buffer[256];
if (waveOutGetErrorTextA(result, buffer,
ARRAY_SIZE(buffer)) == MMSYSERR_NOERROR)
std::size(buffer)) == MMSYSERR_NOERROR)
return FormatRuntimeError("%s: %s", prefix, buffer);
else
return std::runtime_error(prefix);