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