Files
scylladb/api/api.hh
Botond Dénes b341aa8f6d Merge 'api/api.hh: improve usage of standard containers' from Patryk Wróbel
This PR contains improvements related to usage of std::vector and looping over containers in the range-for loop.

It is advised to use `std::vector::reserve()` to avoid unneeded memory allocations when the total size is known beforehand.

When looping over a container that stores non-trivial types usage of const reference is advised to avoid redundant copies.

Closes scylladb/scylladb#16978

* github.com:scylladb/scylladb:
  api/api.hh: use const reference when looping over container
  api/api.hh: use std::vector::reserve() when the total size is known
2024-01-25 13:22:48 +02:00

9.2 KiB