File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -184,12 +184,14 @@ static void Correct_Queue_range(std::vector<size_t> range)
184
184
small_queue->StartWorkerThreads (SCRIPT_CHECK_THREADS);
185
185
// Make vChecks here to save on malloc (this test can be slow...)
186
186
std::vector<FakeCheckCheckCompletion> vChecks;
187
+ vChecks.reserve (9 );
187
188
for (const size_t i : range) {
188
189
size_t total = i;
189
190
FakeCheckCheckCompletion::n_calls = 0 ;
190
191
CCheckQueueControl<FakeCheckCheckCompletion> control (small_queue.get ());
191
192
while (total) {
192
- vChecks.resize (std::min (total, (size_t ) InsecureRandRange (10 )));
193
+ vChecks.clear ();
194
+ vChecks.resize (std::min<size_t >(total, InsecureRandRange (10 )));
193
195
total -= vChecks.size ();
194
196
control.Add (std::move (vChecks));
195
197
}
You can’t perform that action at this time.
0 commit comments