*: use BufferedOutputStream::Fmt()

This commit is contained in:
Max Kellermann
2022-07-13 12:54:58 +02:00
parent 9a30286289
commit b52b0ac85a
11 changed files with 64 additions and 58 deletions

View File

@@ -33,10 +33,10 @@ void
playlist_vector_save(BufferedOutputStream &os, const PlaylistVector &pv)
{
for (const PlaylistInfo &pi : pv) {
os.Format(PLAYLIST_META_BEGIN "%s\n", pi.name.c_str());
os.Fmt(FMT_STRING(PLAYLIST_META_BEGIN "{}\n"), pi.name);
if (!IsNegative(pi.mtime))
os.Format("mtime: %li\n",
(long)std::chrono::system_clock::to_time_t(pi.mtime));
os.Fmt(FMT_STRING("mtime: {}\n"),
std::chrono::system_clock::to_time_t(pi.mtime));
os.Write("playlist_end\n");
}
}