Skip to content

Commit

Permalink
Handle some more tidy messages
Browse files Browse the repository at this point in the history
  • Loading branch information
ckormanyos committed Oct 12, 2024
1 parent 728d878 commit 8104e86
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions math/wide_decimal/decwide_t.h
Original file line number Diff line number Diff line change
Expand Up @@ -4394,8 +4394,8 @@
// Determine the kind of output format requested (scientific, fixed, none).
detail::os_float_field_type my_float_field { };

if ((ostrm_flags & std::ios::scientific) != static_cast<local_flags_type>(UINT8_C(0))) { my_float_field = detail::os_float_field_type::scientific; }
else if((ostrm_flags & std::ios::fixed) != static_cast<local_flags_type>(UINT8_C(0))) { my_float_field = detail::os_float_field_type::fixed; }
if (static_cast<local_flags_type>(ostrm_flags & std::ios::scientific) == static_cast<local_flags_type>(std::ios::scientific)) { my_float_field = detail::os_float_field_type::scientific; }
else if(static_cast<local_flags_type>(ostrm_flags & std::ios::fixed) == static_cast<local_flags_type>(std::ios::fixed)) { my_float_field = detail::os_float_field_type::fixed; }
else { my_float_field = detail::os_float_field_type::none; }

// Get the output stream's precision and limit it to max_digits10.
Expand Down Expand Up @@ -4500,7 +4500,8 @@
get_output_string(x, str, the_exp, number_of_digits10_i_want);

// Obtain additional format information.
const bool my_showpoint
const bool
my_showpoint
{
static_cast<local_flags_type>(ostrm_flags & std::ios::showpoint) == static_cast<local_flags_type>(std::ios::showpoint)
};
Expand Down Expand Up @@ -4532,10 +4533,11 @@
const auto n_fill = static_cast<std::uint_fast32_t>(my_width - str.length());

// Left-justify is the exception, std::right and std::internal justify right.
const auto my_left =
(
static_cast<local_flags_type>(ostrm_flags & std::ios::left) != static_cast<local_flags_type>(static_cast<unsigned>(UINT8_C(0)))
);
const bool
my_left
{
static_cast<local_flags_type>(ostrm_flags & std::ios::left) == static_cast<local_flags_type>(std::ios::left)
};

// Justify left or right and insert the fill characters.
str.insert((my_left ? str.end() : str.begin()), static_cast<std::size_t>(n_fill), ostrm_fill);
Expand Down

0 comments on commit 8104e86

Please sign in to comment.