storage/Interface: convert URI parameters to std::string_view

This commit is contained in:
Max Kellermann
2020-04-03 16:22:39 +02:00
parent 0080eee857
commit a98d627c0b
12 changed files with 115 additions and 128 deletions

View File

@@ -54,11 +54,11 @@ SongLoader::LoadFile(const char *path_utf8, Path path_fs) const
{
#ifdef ENABLE_DATABASE
if (storage != nullptr) {
const char *suffix = storage->MapToRelativeUTF8(path_utf8);
if (suffix != nullptr)
const auto suffix = storage->MapToRelativeUTF8(path_utf8);
if (suffix.data() != nullptr)
/* this path was relative to the music
directory - obtain it from the database */
return LoadFromDatabase(suffix);
return LoadFromDatabase(std::string(suffix).c_str());
}
#endif