util/UriExtract: pass std::string_view to uri_get_suffix()

This commit is contained in:
Max Kellermann
2020-11-04 21:10:58 +01:00
parent 35a232105e
commit 2a9131498f
4 changed files with 14 additions and 12 deletions

View File

@@ -48,7 +48,8 @@ FindContainerDecoderPlugin(std::string_view suffix)
static const DecoderPlugin *
FindContainerDecoderPlugin(Path path)
{
const auto suffix = uri_get_suffix(path.ToUTF8Throw().c_str());
const auto path_utf8 = path.ToUTF8Throw();
const auto suffix = uri_get_suffix(path_utf8);
if (suffix.empty())
return nullptr;