song/*SongFilter: use libfmt
This commit is contained in:
parent
273fc329e0
commit
d0eea87b1a
@ -6,10 +6,14 @@
|
||||
#include "time/ISO8601.hxx"
|
||||
#include "util/StringBuffer.hxx"
|
||||
|
||||
#include <fmt/core.h>
|
||||
|
||||
using std::string_view_literals::operator""sv;
|
||||
|
||||
std::string
|
||||
AddedSinceSongFilter::ToExpression() const noexcept
|
||||
{
|
||||
return std::string("(added-since \"") + FormatISO8601(value).c_str() + "\")";
|
||||
return fmt::format("(added-since \"{}\")"sv, FormatISO8601(value).c_str());
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -5,12 +5,16 @@
|
||||
#include "LightSong.hxx"
|
||||
#include "util/StringBuffer.hxx"
|
||||
|
||||
#include <fmt/core.h>
|
||||
|
||||
using std::string_view_literals::operator""sv;
|
||||
|
||||
std::string
|
||||
AudioFormatSongFilter::ToExpression() const noexcept
|
||||
{
|
||||
return std::string("(AudioFormat ") +
|
||||
(value.IsFullyDefined() ? "==" : "=~") +
|
||||
" \"" + ToString(value).c_str() + "\")";
|
||||
return fmt::format("(AudioFormat {} \"{}\")"sv,
|
||||
value.IsFullyDefined() ? "==" : "=~",
|
||||
ToString(value).c_str());
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -6,10 +6,14 @@
|
||||
#include "time/ISO8601.hxx"
|
||||
#include "util/StringBuffer.hxx"
|
||||
|
||||
#include <fmt/core.h>
|
||||
|
||||
using std::string_view_literals::operator""sv;
|
||||
|
||||
std::string
|
||||
ModifiedSinceSongFilter::ToExpression() const noexcept
|
||||
{
|
||||
return std::string("(modified-since \"") + FormatISO8601(value).c_str() + "\")";
|
||||
return fmt::format("(modified-since \"{}\")"sv, FormatISO8601(value).c_str());
|
||||
}
|
||||
|
||||
bool
|
||||
|
Loading…
Reference in New Issue
Block a user