This commit is contained in:
Max Kellermann 2024-07-05 16:47:04 +02:00
commit 3648475f87
4 changed files with 5 additions and 5 deletions

View File

@ -13,7 +13,7 @@ template<>
struct fmt::formatter<AVSampleFormat> : formatter<string_view>
{
template<typename FormatContext>
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 = "?";

View File

@ -13,7 +13,7 @@ template<>
struct fmt::formatter<SampleFormat> : formatter<string_view>
{
template<typename FormatContext>
auto format(const SampleFormat format, FormatContext &ctx) {
auto format(const SampleFormat format, FormatContext &ctx) const {
return formatter<string_view>::format(sample_format_to_string(format),
ctx);
}
@ -23,7 +23,7 @@ template<>
struct fmt::formatter<AudioFormat> : formatter<string_view>
{
template<typename FormatContext>
auto format(const AudioFormat &af, FormatContext &ctx) {
auto format(const AudioFormat &af, FormatContext &ctx) const {
return formatter<string_view>::format(ToString(af).c_str(),
ctx);
}

View File

@ -12,7 +12,7 @@ template<>
struct fmt::formatter<std::exception_ptr> : formatter<string_view>
{
template<typename FormatContext>
auto format(std::exception_ptr e, FormatContext &ctx) {
auto format(std::exception_ptr e, FormatContext &ctx) const {
return formatter<string_view>::format(GetFullMessage(e), ctx);
}
};

View File

@ -13,7 +13,7 @@ template<std::convertible_to<Path> T>
struct fmt::formatter<T> : formatter<string_view>
{
template<typename FormatContext>
auto format(Path path, FormatContext &ctx) {
auto format(Path path, FormatContext &ctx) const {
return formatter<string_view>::format(path.ToUTF8(), ctx);
}
};