Improve debug codegen

This commit is contained in:
Victor Zverovich
2024-09-02 06:54:45 -07:00
parent 9f29345ea0
commit a6ecd25b80
6 changed files with 14 additions and 14 deletions
+3 -2
View File
@@ -357,7 +357,7 @@ void write_codecvt(codecvt_result<CodeUnit>& out, string_view in_buf,
template <typename OutputIt>
auto write_encoded_tm_str(OutputIt out, string_view in, const std::locale& loc)
-> OutputIt {
if (detail::use_utf8() && loc != get_classic_locale()) {
if (FMT_USE_UTF8 && loc != get_classic_locale()) {
// char16_t and char32_t codecvts are broken in MSVC (linkage errors) and
// gcc-4.
#if FMT_MSC_VERSION != 0 || \
@@ -651,7 +651,8 @@ FMT_CONSTEXPR inline auto get_units() -> const char* {
if (std::is_same<Period, std::femto>::value) return "fs";
if (std::is_same<Period, std::pico>::value) return "ps";
if (std::is_same<Period, std::nano>::value) return "ns";
if (std::is_same<Period, std::micro>::value) return use_utf8() ? "µs" : "us";
if (std::is_same<Period, std::micro>::value)
return FMT_USE_UTF8 ? "µs" : "us";
if (std::is_same<Period, std::milli>::value) return "ms";
if (std::is_same<Period, std::centi>::value) return "cs";
if (std::is_same<Period, std::deci>::value) return "ds";