mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Make objects in range declarations immutable by default. Avoid unnecessary copying of objects in range declarations.
This commit is contained in:
parent
f180e81d57
commit
f34c8c466a
36 changed files with 77 additions and 77 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue