Skip to content

Commit bc801b8

Browse files
committed
Fix werror issues
1 parent c98f81a commit bc801b8

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

include/boost/decimal/detail/to_chars_integer_impl.hpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ BOOST_DECIMAL_CONSTEXPR auto to_chars_integer_impl(char* first, char* last, Inte
6262
}
6363

6464
Unsigned_Integer unsigned_value {};
65-
const auto unsigned_base = static_cast<Unsigned_Integer>(base);
6665

6766
BOOST_DECIMAL_IF_CONSTEXPR (std::is_signed<Integer>::value)
6867
{
@@ -155,7 +154,7 @@ constexpr char* decompose32(std::uint32_t value, char* buffer) noexcept
155154
template <typename Integer>
156155
constexpr to_chars_result to_chars_integer_impl(char* first, char* last, Integer value) noexcept
157156
{
158-
using Unsigned_Integer = typename std::make_unsigned<Integer>::type;
157+
using Unsigned_Integer = make_unsigned_t<Integer>;
159158
Unsigned_Integer unsigned_value {};
160159

161160
char buffer[10] {};
@@ -168,9 +167,9 @@ constexpr to_chars_result to_chars_integer_impl(char* first, char* last, Integer
168167
}
169168

170169
// Strip the sign from the value and apply at the end after parsing if the type is signed
171-
BOOST_DECIMAL_IF_CONSTEXPR (std::is_signed<Integer>::value)
170+
BOOST_DECIMAL_IF_CONSTEXPR (is_signed_v<Integer>)
172171
{
173-
if (value < 0)
172+
if (value < static_cast<Integer>(0))
174173
{
175174
is_negative = true;
176175
unsigned_value = apply_sign(value);

0 commit comments

Comments
 (0)