Skip to content

Commit fb51370

Browse files
committed
Fix MSVC variable shadowing warning
1 parent 987b021 commit fb51370

File tree

1 file changed

+4
-4
lines changed
  • include/boost/decimal/detail/cmath

1 file changed

+4
-4
lines changed

include/boost/decimal/detail/cmath/nan.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@ constexpr auto nan_impl(const char* arg) noexcept -> TargetDecimalType
3838
constexpr TargetDecimalType zero {};
3939
constexpr TargetDecimalType zero_bits {zero ^ zero};
4040

41-
sig_type value {};
42-
const auto r {from_chars_integer_impl<sig_type, sig_type>(arg, arg + detail::strlen(arg), value, 10)};
41+
sig_type payload_value {};
42+
const auto r {from_chars_integer_impl<sig_type, sig_type>(arg, arg + detail::strlen(arg), payload_value, 10)};
4343

44-
if (!r || value > max_payload_value)
44+
if (!r || payload_value > max_payload_value)
4545
{
4646
return nan_type;
4747
}
4848
else
4949
{
50-
return (zero_bits | value) | nan_type;
50+
return (zero_bits | payload_value) | nan_type;
5151
}
5252
}
5353

0 commit comments

Comments
 (0)