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
5 changed files with 5 additions and 5 deletions
+1 -1
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)); }