From 106750db77be01c7b2d277a12d9b80de15cb8fbb Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 4 Jan 2022 12:28:55 +0000 Subject: Replace all uses of push_back with emplace_back. --- src/misc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/misc.cpp') 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 &buffer) std::set 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; } -- cgit