output/snapcast/Client: work around clang 14 std::span cast bug

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1538
This commit is contained in:
Max Kellermann
2022-05-24 13:50:04 +02:00
parent 843dad19e9
commit f045cf43e4
2 changed files with 21 additions and 1 deletions

View File

@@ -25,6 +25,7 @@
#include "event/Loop.hxx"
#include "net/SocketError.hxx"
#include "net/UniqueSocketDescriptor.hxx"
#include "util/SpanCast.hxx"
#include "Log.hxx"
#include <cassert>
@@ -126,7 +127,7 @@ SendT(SocketDescriptor s, const T &buffer) noexcept
static bool
Send(SocketDescriptor s, std::string_view buffer) noexcept
{
return Send(s, std::as_bytes(std::span{buffer}));
return Send(s, AsBytes(buffer));
}
static bool