Skip to content

Commit

Permalink
Fix comparison warning
Browse files Browse the repository at this point in the history
  • Loading branch information
mborland committed Jun 10, 2024
1 parent 8483c80 commit 4affc40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/boost/decimal/detail/fenv_rounding.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ constexpr auto fenv_round(T& val, bool = false) noexcept -> int
++val;
}

if (static_cast<significand_type>(val) > max_significand_v<TargetType>)
if (static_cast<significand_type>(val) > static_cast<significand_type>(max_significand_v<TargetType>))
{
val /= 10;
++exp_delta;
Expand Down Expand Up @@ -63,7 +63,7 @@ constexpr auto fenv_round(T& val, bool is_neg = false) noexcept -> int // NOLINT
// If the significand was e.g. 99'999'999 rounding up
// would put it out of range again

if (static_cast<significand_type>(val) > max_significand_v<TargetType>)
if (static_cast<significand_type>(val) > static_cast<significand_type>(max_significand_v<TargetType>))
{
val /= 10;
++exp_delta;
Expand Down

0 comments on commit 4affc40

Please sign in to comment.