lib/fmt: remove even more now-broken uses of FMT_STRING
MPD stopped building since fmt 11.1.0; see <https://github.com/fmtlib/fmt/issues/4304>. The first commit fixing this was9db7144, followed by5de0909(both on the unstable branch). This commit removes what the author believes to be the remaining uses in the MPD codebase.
This commit is contained in:
@@ -29,35 +29,35 @@ static void
|
||||
range_save(BufferedOutputStream &os, unsigned start_ms, unsigned end_ms)
|
||||
{
|
||||
if (end_ms > 0)
|
||||
os.Fmt(FMT_STRING("Range: {}-{}\n"), start_ms, end_ms);
|
||||
os.Fmt("Range: {}-{}\n", start_ms, end_ms);
|
||||
else if (start_ms > 0)
|
||||
os.Fmt(FMT_STRING("Range: {}-\n"), start_ms);
|
||||
os.Fmt("Range: {}-\n", start_ms);
|
||||
}
|
||||
|
||||
void
|
||||
song_save(BufferedOutputStream &os, const Song &song)
|
||||
{
|
||||
os.Fmt(FMT_STRING(SONG_BEGIN "{}\n"), song.filename);
|
||||
os.Fmt(SONG_BEGIN "{}\n", song.filename);
|
||||
|
||||
if (!song.target.empty())
|
||||
os.Fmt(FMT_STRING("Target: {}\n"), song.target);
|
||||
os.Fmt("Target: {}\n", song.target);
|
||||
|
||||
range_save(os, song.start_time.ToMS(), song.end_time.ToMS());
|
||||
|
||||
tag_save(os, song.tag);
|
||||
|
||||
if (song.audio_format.IsDefined())
|
||||
os.Fmt(FMT_STRING("Format: {}\n"), song.audio_format);
|
||||
os.Fmt("Format: {}\n", song.audio_format);
|
||||
|
||||
if (song.in_playlist)
|
||||
os.Write("InPlaylist: yes\n");
|
||||
|
||||
if (!IsNegative(song.mtime))
|
||||
os.Fmt(FMT_STRING(SONG_MTIME ": {}\n"),
|
||||
os.Fmt(SONG_MTIME ": {}\n",
|
||||
std::chrono::system_clock::to_time_t(song.mtime));
|
||||
|
||||
if (!IsNegative(song.added))
|
||||
os.Fmt(FMT_STRING(SONG_ADDED ": {}\n"),
|
||||
os.Fmt(SONG_ADDED ": {}\n",
|
||||
std::chrono::system_clock::to_time_t(song.added));
|
||||
os.Write(SONG_END "\n");
|
||||
}
|
||||
@@ -65,18 +65,18 @@ song_save(BufferedOutputStream &os, const Song &song)
|
||||
void
|
||||
song_save(BufferedOutputStream &os, const DetachedSong &song)
|
||||
{
|
||||
os.Fmt(FMT_STRING(SONG_BEGIN "{}\n"), song.GetURI());
|
||||
os.Fmt(SONG_BEGIN "{}\n", song.GetURI());
|
||||
|
||||
range_save(os, song.GetStartTime().ToMS(), song.GetEndTime().ToMS());
|
||||
|
||||
tag_save(os, song.GetTag());
|
||||
|
||||
if (!IsNegative(song.GetLastModified()))
|
||||
os.Fmt(FMT_STRING(SONG_MTIME ": {}\n"),
|
||||
os.Fmt(SONG_MTIME ": {}\n",
|
||||
std::chrono::system_clock::to_time_t(song.GetLastModified()));
|
||||
|
||||
if (!IsNegative(song.GetAdded()))
|
||||
os.Fmt(FMT_STRING(SONG_ADDED ": {}\n"),
|
||||
os.Fmt(SONG_ADDED ": {}\n",
|
||||
std::chrono::system_clock::to_time_t(song.GetAdded()));
|
||||
os.Write(SONG_END "\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user