Reserve size of some containers we are filling
This commit is contained in:
parent
812e3b5f03
commit
19dc6cadea
31 changed files with 317 additions and 209 deletions
|
|
@ -1220,6 +1220,7 @@ send_encrypted_to_device_messages(const std::map<std::string, std::vector<std::s
|
|||
auto deviceTargets = devices;
|
||||
if (devices.empty()) {
|
||||
deviceTargets.clear();
|
||||
deviceTargets.reserve(deviceKeys->device_keys.size());
|
||||
for (const auto &[device, keys] : deviceKeys->device_keys) {
|
||||
(void)keys;
|
||||
deviceTargets.push_back(device);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue