Skip to content

Commit

Permalink
Size formatter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Epixu committed Jan 23, 2024
1 parent 9264d2e commit 2077a0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/Logger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,14 +311,14 @@ namespace fmt
/// Extend FMT to be capable of logging byte sizes
///
template<>
struct fmt::formatter<::Langulus::Size> {
struct formatter<Langulus::Size> {
template<typename ParseContext>
constexpr auto parse(ParseContext& ctx) {
return ctx.begin();
}

template<typename FormatContext>
auto format(const ::Langulus::Size& bs, FormatContext& ctx) {
auto format(const Langulus::Size& bs, FormatContext& ctx) {
double f;
if (bs < 1'000LL) f = static_cast<float>(bs);
else if (bs < 1'000'000LL) f = bs * 1. / 1000LL;
Expand Down

0 comments on commit 2077a0b

Please sign in to comment.