From 728d8787cc2d4570092bc51efd31e4846c8b460b Mon Sep 17 00:00:00 2001 From: ckormanyos Date: Sat, 12 Oct 2024 09:58:09 +0200 Subject: [PATCH] Handle even more tidy messages --- examples/example007_catalan_series.cpp | 2 +- examples/example008_bernoulli_tgamma.cpp | 2 +- math/wide_decimal/decwide_t.h | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/example007_catalan_series.cpp b/examples/example007_catalan_series.cpp index 9c291f49..03433647 100644 --- a/examples/example007_catalan_series.cpp +++ b/examples/example007_catalan_series.cpp @@ -23,7 +23,7 @@ namespace example007_catalan template auto pi() -> FloatingPointType { - return static_cast(3.1415926535897932384626433832795029L); // NOLINT(cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers) + return static_cast(3.1415926535897932384626433832795029L); // NOLINT(cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers,modernize-use-std-numbers) } template<> diff --git a/examples/example008_bernoulli_tgamma.cpp b/examples/example008_bernoulli_tgamma.cpp index 73c17ea9..8a42eb4d 100644 --- a/examples/example008_bernoulli_tgamma.cpp +++ b/examples/example008_bernoulli_tgamma.cpp @@ -88,7 +88,7 @@ namespace example008_bernoulli template auto pi() -> FloatingPointType { - return static_cast(3.1415926535897932384626433832795029L); // NOLINT(cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers) + return static_cast(3.1415926535897932384626433832795029L); // NOLINT(cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers,modernize-use-std-numbers) } template<> diff --git a/math/wide_decimal/decwide_t.h b/math/wide_decimal/decwide_t.h index eeae40dc..02f16908 100644 --- a/math/wide_decimal/decwide_t.h +++ b/math/wide_decimal/decwide_t.h @@ -4500,7 +4500,10 @@ get_output_string(x, str, the_exp, number_of_digits10_i_want); // Obtain additional format information. - const auto my_showpoint = ((ostrm_flags & std::ios::showpoint) != static_cast(UINT8_C(0))); + const bool my_showpoint + { + static_cast(ostrm_flags & std::ios::showpoint) == static_cast(std::ios::showpoint) + }; // Write the output string in the desired format. if (my_float_field == detail::os_float_field_type::scientific) { wr_string_scientific(str, the_exp, os_precision, my_showpoint, my_uppercase); }