MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / write

Method write

extlibs/fmt/include/fmt/chrono.h:872–880  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

870 }
871
872 void write(Rep value, int width) {
873 write_sign();
874 if (isnan(value)) return write_nan();
875 uint32_or_64_or_128_t<int> n =
876 to_unsigned(to_nonnegative_int(value, max_value<int>()));
877 int num_digits = internal::count_digits(n);
878 if (width > num_digits) out = std::fill_n(out, width - num_digits, '0');
879 out = format_decimal<char_type>(out, n, num_digits);
880 }
881
882 void write_nan() { std::copy_n("nan", 3, out); }
883 void write_pinf() { std::copy_n("inf", 3, out); }

Callers 1

formatMethod · 0.45

Calls 3

to_nonnegative_intFunction · 0.85
isnanFunction · 0.70
count_digitsFunction · 0.70

Tested by

no test coverage detected