Skip to content

Commit 696efbc

Browse files
committed
Remove shift of negative values
1 parent 8c7d20e commit 696efbc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

test/benchmark_uints.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ int main()
571571
#endif
572572

573573
test_two_element_operation(old_vector, std::modulus<>(), "mod", "Old");
574-
test_two_element_operation(new_vector, std::modulus<>(), "div", "New");
574+
test_two_element_operation(new_vector, std::modulus<>(), "mod", "New");
575575

576576
std::cout << std::endl;
577577

test/test_u128.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ void test_operator_xor()
671671
template <typename IntType>
672672
void test_operator_left_shift()
673673
{
674-
boost::random::uniform_int_distribution<IntType> dist(std::numeric_limits<IntType>::min(),
674+
boost::random::uniform_int_distribution<IntType> dist(static_cast<IntType>(0),
675675
std::numeric_limits<IntType>::max());
676676

677677
boost::random::uniform_int_distribution<unsigned> shift_dist(0, sizeof(IntType) * CHAR_BIT - 1);
@@ -696,7 +696,7 @@ void test_operator_left_shift()
696696
template <typename IntType>
697697
void test_operator_right_shift()
698698
{
699-
boost::random::uniform_int_distribution<IntType> dist(std::numeric_limits<IntType>::min(),
699+
boost::random::uniform_int_distribution<IntType> dist(static_cast<IntType>(0),
700700
std::numeric_limits<IntType>::max());
701701

702702
boost::random::uniform_int_distribution<unsigned> shift_dist(0, sizeof(IntType) * CHAR_BIT - 1);

0 commit comments

Comments
 (0)