playlist/registry: simplify ExtractMimeTypeMainPart()

This commit is contained in:
Max Kellermann 2020-11-04 13:34:02 +01:00
parent dc432f3ffa
commit bb009daf66
1 changed files with 1 additions and 5 deletions

View File

@ -207,11 +207,7 @@ gcc_pure
static StringView
ExtractMimeTypeMainPart(StringView s) noexcept
{
const auto separator = s.Find(';');
if (separator != nullptr)
s.SetEnd(separator);
return s;
return s.Split(';').first;
}
static std::unique_ptr<SongEnumerator>