diff --git a/src/SongUpdate.cxx b/src/SongUpdate.cxx index 4b7edac8b..db551d12b 100644 --- a/src/SongUpdate.cxx +++ b/src/SongUpdate.cxx @@ -63,10 +63,10 @@ Song::UpdateFile(Storage &storage) auto new_audio_format = AudioFormat::Undefined(); try { - const auto path_fs = storage.MapFS(relative_uri.c_str()); + const auto path_fs = storage.MapFS(relative_uri); if (path_fs.IsNull()) { const auto absolute_uri = - storage.MapUTF8(relative_uri.c_str()); + storage.MapUTF8(relative_uri); if (!tag_stream_scan(absolute_uri.c_str(), tag_builder, &new_audio_format)) return false; diff --git a/src/db/DatabaseSong.cxx b/src/db/DatabaseSong.cxx index 638979b9e..a18ccad4c 100644 --- a/src/db/DatabaseSong.cxx +++ b/src/db/DatabaseSong.cxx @@ -21,7 +21,7 @@ DatabaseDetachSong(const Storage *storage, const LightSong &song) noexcept if (storage != nullptr) { if (!detached.HasRealURI()) { const auto uri = song.GetURI(); - detached.SetRealURI(storage->MapUTF8(uri.c_str())); + detached.SetRealURI(storage->MapUTF8(uri)); } else if (uri_is_relative_path(detached.GetRealURI())) { /* if the "RealURI" is relative, translate it using the song's "URI" attribute, because @@ -29,7 +29,7 @@ DatabaseDetachSong(const Storage *storage, const LightSong &song) noexcept const auto real_uri = uri_apply_relative(detached.GetRealURI(), song.GetURI()); - detached.SetRealURI(storage->MapUTF8(real_uri.c_str())); + detached.SetRealURI(storage->MapUTF8(real_uri)); } } diff --git a/src/storage/StorageInterface.cxx b/src/storage/StorageInterface.cxx index e7a61b115..b816f8c9d 100644 --- a/src/storage/StorageInterface.cxx +++ b/src/storage/StorageInterface.cxx @@ -16,5 +16,5 @@ Storage::MapChildFS(std::string_view uri_utf8, std::string_view child_utf8) const noexcept { const auto uri2 = PathTraitsUTF8::Build(uri_utf8, child_utf8); - return MapFS(uri2.c_str()); + return MapFS(uri2); }