diff options
author | Sadie Powell <sadie@witchery.services> | 2022-01-04 12:28:55 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2022-01-04 12:28:55 +0000 |
commit | 106750db77be01c7b2d277a12d9b80de15cb8fbb (patch) | |
tree | 87df7f8b5966ca704f20ee7ab6a79b45ed2e95a2 /src/misc.cpp | |
parent | 7d1047490e4380c4f02900b711c66055d29fb387 (diff) |
Replace all uses of push_back with emplace_back.
Diffstat (limited to 'src/misc.cpp')
-rw-r--r-- | src/misc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/misc.cpp b/src/misc.cpp index ff1b05b02..11f038710 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -143,7 +143,7 @@ void ListFormatter::Process(std::vector<Anope::string> &buffer) std::set<Anope::string> breaks; for (unsigned i = 0; i < this->columns.size(); ++i) { - tcolumns.push_back(Language::Translate(this->nc, this->columns[i].c_str())); + tcolumns.emplace_back(Language::Translate(this->nc, this->columns[i].c_str())); lengths[this->columns[i]] = tcolumns[i].length(); } for (unsigned i = 0; i < this->entries.size(); ++i) @@ -234,7 +234,7 @@ Anope::string& InfoFormatter::operator[](const Anope::string &key) Anope::string tkey = Language::Translate(this->nc, key.c_str()); if (tkey.length() > this->longest) this->longest = tkey.length(); - this->replies.push_back(std::make_pair(tkey, "")); + this->replies.emplace_back(tkey, ""); return this->replies.back().second; } |