lib/alsa/AllowedFormat: use StringView::RemoveSuffix()
This commit is contained in:
parent
b8890726f2
commit
a9344fafe9
@ -30,12 +30,7 @@ namespace Alsa {
|
|||||||
AllowedFormat::AllowedFormat(StringView s)
|
AllowedFormat::AllowedFormat(StringView s)
|
||||||
{
|
{
|
||||||
#ifdef ENABLE_DSD
|
#ifdef ENABLE_DSD
|
||||||
const StringView dop_tail("=dop");
|
dop = s.RemoveSuffix("=dop");
|
||||||
if (s.EndsWith(dop_tail)) {
|
|
||||||
dop = true;
|
|
||||||
s.size -= dop_tail.size;
|
|
||||||
} else
|
|
||||||
dop = false;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char buffer[64];
|
char buffer[64];
|
||||||
|
Loading…
Reference in New Issue
Block a user