fs/AllocatedPath: pass std::string_view to FromUTF8()
This commit is contained in:
@@ -436,7 +436,7 @@ SimpleDatabase::Mount(const char *local_uri, const char *storage_uri)
|
||||
std::string name(storage_uri);
|
||||
std::replace_if(name.begin(), name.end(), IsUnsafeChar, '_');
|
||||
|
||||
const auto name_fs = AllocatedPath::FromUTF8Throw(name.c_str());
|
||||
const auto name_fs = AllocatedPath::FromUTF8Throw(name);
|
||||
|
||||
#ifndef ENABLE_ZLIB
|
||||
constexpr bool compress = false;
|
||||
|
||||
@@ -81,7 +81,7 @@ UpdateWalk::RemoveExcludedFromDirectory(Directory &directory,
|
||||
directory.ForEachSongSafe([&](Song &song){
|
||||
assert(&song.parent == &directory);
|
||||
|
||||
const auto name_fs = AllocatedPath::FromUTF8(song.filename.c_str());
|
||||
const auto name_fs = AllocatedPath::FromUTF8(song.filename);
|
||||
if (name_fs.IsNull() || exclude_list.Check(name_fs)) {
|
||||
editor.DeleteSong(directory, &song);
|
||||
modified = true;
|
||||
|
||||
Reference in New Issue
Block a user