replace push_back by emplace_back where possible

This commit is contained in:
Konstantinos Margaritis
2021-03-26 12:39:40 +02:00
committed by Konstantinos Margaritis
parent df769a9a9a
commit 7c6e47c95b
92 changed files with 535 additions and 535 deletions

View File

@@ -163,7 +163,7 @@ public:
std::pair<iterator, bool> insert(const Key &key, const Element &element) {
const auto idx = data.size();
if (map.emplace(key, idx).second) {
data.push_back(element);
data.emplace_back(element);
return {begin() + idx, true};
}
return {end(), false};