summaryrefslogtreecommitdiff
path: root/src/playlist
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2020-11-04 13:34:02 +0100
committerMax Kellermann <max@musicpd.org>2020-11-04 13:34:04 +0100
commitbb009daf66372ffa102d432df2643502891cbe6c (patch)
tree137d4824bda4860f184c84903f67a36b72b5e0c8 /src/playlist
parentdc432f3ffa9b1c8a60b9224c0ae00a40b8b819d1 (diff)
playlist/registry: simplify ExtractMimeTypeMainPart()
Diffstat (limited to 'src/playlist')
-rw-r--r--src/playlist/PlaylistRegistry.cxx6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/playlist/PlaylistRegistry.cxx b/src/playlist/PlaylistRegistry.cxx
index 9aa87b73b..5b7ef71d3 100644
--- a/src/playlist/PlaylistRegistry.cxx
+++ b/src/playlist/PlaylistRegistry.cxx
@@ -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>