Skip to content

Commit ec4a242

Browse files
authored
[Common] Avoid doubling of the reserved size (#16780)
1 parent 174dcf4 commit ec4a242

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Common/Tools/EventSelectionModule.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ class BcSelectionModule
310310
return;
311311
}
312312
bcselbuffer.clear();
313+
bcselbuffer.reserve(bcs.size());
313314
for (const auto& bc : bcs) {
314315
uint64_t timestamp = timestamps[bc.globalIndex()];
315316
par = ccdb->template getForTimeStamp<EventSelectionParams>("EventSelection/EventSelectionParams", timestamp);
@@ -453,6 +454,7 @@ class BcSelectionModule
453454

454455
int run = bcs.iteratorAt(0).runNumber();
455456

457+
bcselbuffer.reserve(bcs.size());
456458
// bc loop
457459
for (auto bc : bcs) { // o2-linter: disable=const-ref-in-for-loop (use bc as nonconst iterator)
458460
uint64_t timestamp = timestamps[bc.globalIndex()];

0 commit comments

Comments
 (0)