From 4b54b03df9103909e45873d93dd081d202e00c43 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Mon, 2 Jan 2017 20:56:21 +0100 Subject: Simplify loop to foreach in test_random_integer() --- src/tests/test_bigint.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tests/test_bigint.cpp') diff --git a/src/tests/test_bigint.cpp b/src/tests/test_bigint.cpp index f07c82330..e23f50055 100644 --- a/src/tests/test_bigint.cpp +++ b/src/tests/test_bigint.cpp @@ -162,9 +162,9 @@ class BigInt_Unit_Tests : public Test counts[r - range_min] += 1; } - for(size_t i = 0; i != counts.size(); ++i) + for(const auto count : counts) { - double ratio = static_cast(counts[i]) / ITERATIONS_PER_POSSIBLE_VALUE; + double ratio = static_cast(count) / ITERATIONS_PER_POSSIBLE_VALUE; if(ratio >= 0.85 && ratio <= 1.15) // +/-15 % { -- cgit v1.2.3