use const refs in for loops for non tiny types

This commit is contained in:
moneromooo-monero 2017-12-13 11:21:18 +00:00
parent f0568ca6ac
commit b51dc56687
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
5 changed files with 5 additions and 5 deletions

View file

@ -51,7 +51,7 @@ class size_logger
public:
~size_logger()
{
for (const auto i: types)
for (const auto &i: types)
std::cout << std::to_string(i.first) << "\t" << i.second << std::endl;
}
void add(const char *type, size_t size) { types.insert(std::make_pair(size, type)); }