aboutsummaryrefslogtreecommitdiff
path: root/src/test/prevector_tests.cpp
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2018-02-23 08:10:42 +0100
committerpracticalswift <practicalswift@users.noreply.github.com>2018-02-23 08:10:42 +0100
commit2736c9e05ebd71f2eeab490de7f9fba9ea8b4169 (patch)
tree2288814a29ae4c38f18fdd8e594e82541879db47 /src/test/prevector_tests.cpp
parentaae64a21ba25ca86fe2bbb581681dc20d613fb44 (diff)
Avoid unintentional unsigned integer wraparounds in tests
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) {