Skip to content

Commit 31dfe95

Browse files
committed
Remove incorrect depromote calls.
1 parent 597f792 commit 31dfe95

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

  • include/bitcoin/system/impl/math

include/bitcoin/system/impl/math/bits.ipp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,7 @@ template <typename Value, if_unsigned_integral_integer<Value>>
306306
constexpr void shift_left_into(Value& value, size_t shift, bool overflow) NOEXCEPT
307307
{
308308
constexpr auto span = bits<Value>;
309-
overflow && shift >= span ? value = 0 : depromote<Value>(
310-
value <<= (shift % span));
309+
overflow && shift >= span ? value = 0 : value <<= (shift % span);
311310
}
312311

313312
// signed overloads (shift left of negative is undefined behavior).
@@ -337,8 +336,7 @@ template <typename Value, if_unsigned_integral_integer<Value>>
337336
constexpr void shift_right_into(Value& value, size_t shift, bool overflow) NOEXCEPT
338337
{
339338
constexpr auto span = bits<Value>;
340-
overflow && shift >= span ? value = 0 : depromote<Value>(
341-
value >>= (shift % span));
339+
overflow && shift >= span ? value = 0 : value >>= (shift % span);
342340
}
343341

344342
// signed overloads (shift right of negative is unspecified behavior).

0 commit comments

Comments
 (0)