Merge pull request #1144 from ajakk/master
libfmt >=8.0.0 compatibility
This commit is contained in:
commit
1c2e0083ba
|
@ -35,7 +35,11 @@ namespace fmt {
|
||||||
// The rationale for ignoring it is that the only reason to specify
|
// The rationale for ignoring it is that the only reason to specify
|
||||||
// an alignment and a with is to get a fixed width bar, and ">" is
|
// an alignment and a with is to get a fixed width bar, and ">" is
|
||||||
// sufficient in this implementation.
|
// sufficient in this implementation.
|
||||||
|
#if FMT_VERSION < 80000
|
||||||
width = parse_nonnegative_int(it, end, ctx);
|
width = parse_nonnegative_int(it, end, ctx);
|
||||||
|
#else
|
||||||
|
width = detail::parse_nonnegative_int(it, end, -1);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
return it;
|
return it;
|
||||||
}
|
}
|
||||||
|
|
|
@ -196,6 +196,9 @@ template <>
|
||||||
struct fmt::formatter<waybar_time> : fmt::formatter<std::tm> {
|
struct fmt::formatter<waybar_time> : fmt::formatter<std::tm> {
|
||||||
template <typename FormatContext>
|
template <typename FormatContext>
|
||||||
auto format(const waybar_time& t, FormatContext& ctx) {
|
auto format(const waybar_time& t, FormatContext& ctx) {
|
||||||
|
#if FMT_VERSION >= 80000
|
||||||
|
auto& tm_format = specs;
|
||||||
|
#endif
|
||||||
return format_to(ctx.out(), "{}", date::format(t.locale, fmt::to_string(tm_format), t.ztime));
|
return format_to(ctx.out(), "{}", date::format(t.locale, fmt::to_string(tm_format), t.ztime));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue