File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
include/boost/decimal/detail Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -419,13 +419,13 @@ constexpr u256 operator>>(const u256& lhs, const int shift) noexcept
419419 return result;
420420 }
421421
422- const auto word_shift {shift / 64 };
423- const auto bit_shift {shift % 64 };
422+ const auto word_shift {static_cast <std:: size_t >( shift / 64 ) };
423+ const auto bit_shift {static_cast <std:: size_t >( shift % 64 ) };
424424
425425 // Only moving whole words
426426 if (bit_shift == 0 )
427427 {
428- for (int i {}; i < 4 - word_shift; ++i)
428+ for (std:: size_t i {}; i < 4 - word_shift; ++i)
429429 {
430430 result[i] = lhs[i + word_shift];
431431 }
@@ -434,7 +434,7 @@ constexpr u256 operator>>(const u256& lhs, const int shift) noexcept
434434 }
435435
436436 // Handle partial shifts across word boundaries
437- for (int i {}; i < 4 - word_shift - 1 ; ++i)
437+ for (std:: size_t i {}; i < 4 - word_shift - 1 ; ++i)
438438 {
439439 result[i] = (lhs[i + word_shift] >> bit_shift) |
440440 (lhs[i + word_shift + 1 ] << (64 - bit_shift));
You can’t perform that action at this time.
0 commit comments