diff --git a/src/lib/ffmpeg/LibFmt.hxx b/src/lib/ffmpeg/LibFmt.hxx index aa068711f..dee83ed2d 100644 --- a/src/lib/ffmpeg/LibFmt.hxx +++ b/src/lib/ffmpeg/LibFmt.hxx @@ -13,7 +13,7 @@ template<> struct fmt::formatter : formatter { template - auto format(const AVSampleFormat format, FormatContext &ctx) { + auto format(const AVSampleFormat format, FormatContext &ctx) const { const char *name = av_get_sample_fmt_name(format); if (name == nullptr) name = "?"; diff --git a/src/lib/fmt/AudioFormatFormatter.hxx b/src/lib/fmt/AudioFormatFormatter.hxx index e0ffb6216..8da98efd4 100644 --- a/src/lib/fmt/AudioFormatFormatter.hxx +++ b/src/lib/fmt/AudioFormatFormatter.hxx @@ -13,7 +13,7 @@ template<> struct fmt::formatter : formatter { template - auto format(const SampleFormat format, FormatContext &ctx) { + auto format(const SampleFormat format, FormatContext &ctx) const { return formatter::format(sample_format_to_string(format), ctx); } @@ -23,7 +23,7 @@ template<> struct fmt::formatter : formatter { template - auto format(const AudioFormat &af, FormatContext &ctx) { + auto format(const AudioFormat &af, FormatContext &ctx) const { return formatter::format(ToString(af).c_str(), ctx); } diff --git a/src/lib/fmt/ExceptionFormatter.hxx b/src/lib/fmt/ExceptionFormatter.hxx index 3f342df67..f08b3bb22 100644 --- a/src/lib/fmt/ExceptionFormatter.hxx +++ b/src/lib/fmt/ExceptionFormatter.hxx @@ -12,7 +12,7 @@ template<> struct fmt::formatter : formatter { template - auto format(std::exception_ptr e, FormatContext &ctx) { + auto format(std::exception_ptr e, FormatContext &ctx) const { return formatter::format(GetFullMessage(e), ctx); } }; diff --git a/src/lib/fmt/PathFormatter.hxx b/src/lib/fmt/PathFormatter.hxx index e5ae89dec..add06df81 100644 --- a/src/lib/fmt/PathFormatter.hxx +++ b/src/lib/fmt/PathFormatter.hxx @@ -13,7 +13,7 @@ template T> struct fmt::formatter : formatter { template - auto format(Path path, FormatContext &ctx) { + auto format(Path path, FormatContext &ctx) const { return formatter::format(path.ToUTF8(), ctx); } };