diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2018-06-18 07:58:28 +0200 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2018-08-27 18:19:33 +0200 |
commit | f34c8c466a0e514edac2e8683127b4176ad5d321 (patch) | |
tree | 587ba001d5d6eaae71d234009098710dd30354c3 /src/test/checkqueue_tests.cpp | |
parent | f180e81d5780805a28bcc71c2bb6b16076336c3c (diff) |
Make objects in range declarations immutable by default. Avoid unnecessary copying of objects in range declarations.
Diffstat (limited to 'src/test/checkqueue_tests.cpp')
-rw-r--r-- | src/test/checkqueue_tests.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/checkqueue_tests.cpp b/src/test/checkqueue_tests.cpp index 39d0061c1c..2732598b4f 100644 --- a/src/test/checkqueue_tests.cpp +++ b/src/test/checkqueue_tests.cpp @@ -155,7 +155,7 @@ static void Correct_Queue_range(std::vector<size_t> range) } // Make vChecks here to save on malloc (this test can be slow...) std::vector<FakeCheckCheckCompletion> vChecks; - for (auto i : range) { + for (const size_t i : range) { size_t total = i; FakeCheckCheckCompletion::n_calls = 0; CCheckQueueControl<FakeCheckCheckCompletion> control(small_queue.get()); @@ -253,7 +253,7 @@ BOOST_AUTO_TEST_CASE(test_CheckQueue_Recovers_From_Failure) } for (auto times = 0; times < 10; ++times) { - for (bool end_fails : {true, false}) { + for (const bool end_fails : {true, false}) { CCheckQueueControl<FailingCheck> control(fail_queue.get()); { std::vector<FailingCheck> vChecks; |