From 689ec7a087cd3c362f74aa13b8faf801910f51cb Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Wed, 11 Sep 2024 16:05:34 -0700 Subject: [PATCH] Cleanup --- include/fmt/chrono.h | 2 -- include/fmt/xchar.h | 4 ++-- test/format-test.cc | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 26975cd7..81fd014c 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1668,10 +1668,8 @@ class get_locale { public: get_locale(bool localized, locale_ref loc) : has_locale_(localized) { -#ifndef FMT_STATIC_THOUSANDS_SEPARATOR if (localized) ::new (&locale_) std::locale(loc.template get()); -#endif } ~get_locale() { if (has_locale_) locale_.~locale(); diff --git a/include/fmt/xchar.h b/include/fmt/xchar.h index 30334a34..6644b6ad 100644 --- a/include/fmt/xchar.h +++ b/include/fmt/xchar.h @@ -15,7 +15,7 @@ #ifndef FMT_MODULE # include -# if !defined(FMT_STATIC_THOUSANDS_SEPARATOR) +# if FMT_USE_LOCALE # include # endif #endif @@ -45,7 +45,7 @@ using format_string_char_t = typename format_string_char::type; inline auto write_loc(basic_appender out, loc_value value, const format_specs& specs, locale_ref loc) -> bool { -#ifndef FMT_STATIC_THOUSANDS_SEPARATOR +#if FMT_USE_LOCALE auto& numpunct = std::use_facet>(loc.get()); auto separator = std::wstring(); diff --git a/test/format-test.cc b/test/format-test.cc index bac32a07..e9771bd7 100644 --- a/test/format-test.cc +++ b/test/format-test.cc @@ -2514,7 +2514,7 @@ TEST(format_test, writer) { } #if FMT_USE_BITINT -# pragma clang diagnostic ignored "-Wbit-int-extension" +FMT_CLANG_PRAGMA(diagnostic ignored "-Wbit-int-extension") TEST(format_test, bitint) { using fmt::detail::bitint;