mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-30 10:47:35 +02:00
Cleanup
This commit is contained in:
@ -1668,10 +1668,8 @@ class get_locale {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
get_locale(bool localized, locale_ref loc) : has_locale_(localized) {
|
get_locale(bool localized, locale_ref loc) : has_locale_(localized) {
|
||||||
#ifndef FMT_STATIC_THOUSANDS_SEPARATOR
|
|
||||||
if (localized)
|
if (localized)
|
||||||
::new (&locale_) std::locale(loc.template get<std::locale>());
|
::new (&locale_) std::locale(loc.template get<std::locale>());
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
~get_locale() {
|
~get_locale() {
|
||||||
if (has_locale_) locale_.~locale();
|
if (has_locale_) locale_.~locale();
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
#ifndef FMT_MODULE
|
#ifndef FMT_MODULE
|
||||||
# include <cwchar>
|
# include <cwchar>
|
||||||
# if !defined(FMT_STATIC_THOUSANDS_SEPARATOR)
|
# if FMT_USE_LOCALE
|
||||||
# include <locale>
|
# include <locale>
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
@ -45,7 +45,7 @@ using format_string_char_t = typename format_string_char<S>::type;
|
|||||||
|
|
||||||
inline auto write_loc(basic_appender<wchar_t> out, loc_value value,
|
inline auto write_loc(basic_appender<wchar_t> out, loc_value value,
|
||||||
const format_specs& specs, locale_ref loc) -> bool {
|
const format_specs& specs, locale_ref loc) -> bool {
|
||||||
#ifndef FMT_STATIC_THOUSANDS_SEPARATOR
|
#if FMT_USE_LOCALE
|
||||||
auto& numpunct =
|
auto& numpunct =
|
||||||
std::use_facet<std::numpunct<wchar_t>>(loc.get<std::locale>());
|
std::use_facet<std::numpunct<wchar_t>>(loc.get<std::locale>());
|
||||||
auto separator = std::wstring();
|
auto separator = std::wstring();
|
||||||
|
@ -2514,7 +2514,7 @@ TEST(format_test, writer) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if FMT_USE_BITINT
|
#if FMT_USE_BITINT
|
||||||
# pragma clang diagnostic ignored "-Wbit-int-extension"
|
FMT_CLANG_PRAGMA(diagnostic ignored "-Wbit-int-extension")
|
||||||
|
|
||||||
TEST(format_test, bitint) {
|
TEST(format_test, bitint) {
|
||||||
using fmt::detail::bitint;
|
using fmt::detail::bitint;
|
||||||
|
Reference in New Issue
Block a user