From 49339528112c57de5e52f2e8bbea91bf37c3704a Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 30 Mar 2021 19:44:07 +0100 Subject: Use emplace_back where possible. --- src/modules/m_hostchange.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/modules/m_hostchange.cpp') diff --git a/src/modules/m_hostchange.cpp b/src/modules/m_hostchange.cpp index e739dd17a..4e628e638 100644 --- a/src/modules/m_hostchange.cpp +++ b/src/modules/m_hostchange.cpp @@ -154,12 +154,12 @@ private: if (stdalgo::string::equalsci(action, "addaccount")) { // The hostname is in the format [prefix][suffix]. - rules.push_back(HostRule(HostRule::HCA_ADDACCOUNT, mask, ports, tag->getString("prefix"), tag->getString("suffix"))); + rules.emplace_back(HostRule::HCA_ADDACCOUNT, mask, ports, tag->getString("prefix"), tag->getString("suffix")); } else if (stdalgo::string::equalsci(action, "addnick")) { // The hostname is in the format [prefix][suffix]. - rules.push_back(HostRule(HostRule::HCA_ADDNICK, mask, ports, tag->getString("prefix"), tag->getString("suffix"))); + rules.emplace_back(HostRule::HCA_ADDNICK, mask, ports, tag->getString("prefix"), tag->getString("suffix")); } else if (stdalgo::string::equalsci(action, "set")) { @@ -169,7 +169,7 @@ private: throw ModuleException(" is a mandatory field when using the 'set' action, at " + tag->source.str()); // The hostname is in the format . - rules.push_back(HostRule(mask, value, ports)); + rules.emplace_back(mask, value, ports); continue; } else -- cgit v1.3.1-10-gc9f91