Skip to content

Commit 8d2bf74

Browse files
committed
Fix sign conversion warning
1 parent 5fb7d29 commit 8d2bf74

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

include/boost/decimal/decimal128_t.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ constexpr decimal128_t::decimal128_t(T1 coeff, T2 exp, bool sign) noexcept
793793
// Handle the case of sub-normals that don't need further rounding
794794
bits_.high = sign ? detail::d128_sign_mask : UINT64_C(0); // Reset the sign bit
795795
const auto zeros {detail::remove_trailing_zeros(reduced_coeff)};
796-
biased_exp += zeros.number_of_removed_zeros;
796+
biased_exp += static_cast<int>(zeros.number_of_removed_zeros);
797797
reduced_coeff = zeros.trimmed_number;
798798
if (biased_exp > 0)
799799
{

include/boost/decimal/decimal32_t.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ constexpr decimal32_t::decimal32_t(T1 coeff, T2 exp, bool sign) noexcept // NOLI
715715
// Handle the case of sub-normals that don't need further rounding
716716
bits_ = sign ? detail::d32_sign_mask : UINT32_C(0); // Reset the sign bit
717717
const auto zeros {detail::remove_trailing_zeros(reduced_coeff)};
718-
biased_exp += zeros.number_of_removed_zeros;
718+
biased_exp += static_cast<int>(zeros.number_of_removed_zeros);
719719
reduced_coeff = zeros.trimmed_number;
720720
if (biased_exp > 0)
721721
{

include/boost/decimal/decimal64_t.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ constexpr decimal64_t::decimal64_t(T1 coeff, T2 exp, bool sign) noexcept
709709
// Handle the case of sub-normals that don't need further rounding
710710
bits_ = sign ? detail::d64_sign_mask : UINT64_C(0); // Reset the sign bit
711711
const auto zeros {detail::remove_trailing_zeros(reduced_coeff)};
712-
biased_exp += zeros.number_of_removed_zeros;
712+
biased_exp += static_cast<int>(zeros.number_of_removed_zeros);
713713
reduced_coeff = zeros.trimmed_number;
714714
if (biased_exp > 0)
715715
{

0 commit comments

Comments
 (0)