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

@@ -24,7 +24,6 @@
#include "CheckAudioFormat.hxx"
#include "tag/Handler.hxx"
#include "fs/Path.hxx"
#include "util/Macros.hxx"
#include "util/Alloc.hxx"
#include "util/ScopeExit.hxx"
#include "util/RuntimeError.hxx"
@@ -32,6 +31,7 @@
#include <wavpack/wavpack.h>
#include <algorithm>
#include <iterator>
#include <memory>
#include <cstdlib>
@@ -235,7 +235,7 @@ wavpack_decode(DecoderClient &client, WavpackContext *wpc, bool can_seek)
/* wavpack gives us all kind of samples in a 32-bit space */
int32_t chunk[1024];
const uint32_t samples_requested = ARRAY_SIZE(chunk) /
const uint32_t samples_requested = std::size(chunk) /
audio_format.channels;
DecoderCommand cmd = client.GetCommand();