use more libfmt instead of sprintf()

This commit is contained in:
Max Kellermann
2023-03-06 18:47:08 +01:00
parent 02d108774c
commit 415de497d3
18 changed files with 76 additions and 115 deletions
+3 -3
View File
@@ -17,9 +17,10 @@
#include "storage/FileInfo.hxx"
#include "storage/StorageInterface.hxx"
#include "fs/Traits.hxx"
#include "util/StringFormat.hxx"
#include "Log.hxx"
#include <fmt/core.h>
inline void
UpdateWalk::UpdatePlaylistFile(Directory &directory,
SongEnumerator &contents) noexcept
@@ -41,8 +42,7 @@ UpdateWalk::UpdatePlaylistFile(Directory &directory,
the virtual directory (DEVICE_PLAYLIST) to
the containing directory */
: "../" + db_song->filename;
db_song->filename = StringFormat<64>("track%04u",
++track);
db_song->filename = fmt::format("track{:04}", ++track);
{
const ScopeDatabaseLock protect;