aboutsummaryrefslogtreecommitdiff
path: root/src/test/prevector_tests.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-03-05 18:56:33 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2018-03-05 18:56:40 +0100
commit7f999643212d0e9de5296ded90909ece5a7a6ff1 (patch)
treeb614adfd2340111f81e1d34a9ba50e7435330df0 /src/test/prevector_tests.cpp
parent6645eaf0ab30b20401528872ed78f344a6e6805f (diff)
parent2736c9e05ebd71f2eeab490de7f9fba9ea8b4169 (diff)
Merge #12516: Avoid unintentional unsigned integer wraparounds in tests
2736c9e05 Avoid unintentional unsigned integer wraparounds in tests (practicalswift) Pull request description: Avoid unintentional unsigned integer wraparounds in tests. This is a subset of #11535 as suggested by @MarcoFalke :-) Tree-SHA512: 4f4ee8a08870101a3f7451aefa77ae06aaf44e3c3b2f7555faa2b8a8503f97f34e34dffcf65154278f15767dc9823955f52d1aa7b39930b390e57cdf2b65e0f3
Diffstat (limited to 'src/test/prevector_tests.cpp')
-rw-r--r--src/test/prevector_tests.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/prevector_tests.cpp b/src/test/prevector_tests.cpp
index db9162c0db..01c3a6cedd 100644
--- a/src/test/prevector_tests.cpp
+++ b/src/test/prevector_tests.cpp
@@ -206,7 +206,7 @@ BOOST_AUTO_TEST_CASE(PrevectorTestInt)
test.erase(InsecureRandRange(test.size()));
}
if (InsecureRandBits(3) == 2) {
- int new_size = std::max<int>(0, std::min<int>(30, test.size() + (InsecureRandRange(5)) - 2));
+ int new_size = std::max(0, std::min(30, (int)test.size() + (int)InsecureRandRange(5) - 2));
test.resize(new_size);
}
if (InsecureRandBits(3) == 3) {