lib/alsa/AllowedFormat: use StringView::RemoveSuffix()

This commit is contained in:
Max Kellermann 2021-10-23 11:43:28 +02:00
parent b8890726f2
commit a9344fafe9

View File

@ -30,12 +30,7 @@ namespace Alsa {
AllowedFormat::AllowedFormat(StringView s)
{
#ifdef ENABLE_DSD
const StringView dop_tail("=dop");
if (s.EndsWith(dop_tail)) {
dop = true;
s.size -= dop_tail.size;
} else
dop = false;
dop = s.RemoveSuffix("=dop");
#endif
char buffer[64];