From 569324feeecea939854e45bbd44495b849fcfd59 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 18 Apr 2021 04:37:51 +0100 Subject: Migrate collections from insert to emplace. --- src/channels.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/channels.cpp') diff --git a/src/channels.cpp b/src/channels.cpp index 1b3181abe..12c9aeeff 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -37,7 +37,7 @@ Channel::Channel(const std::string &cname, time_t ts) : name(cname) , age(ts) { - if (!ServerInstance->chanlist.insert(std::make_pair(cname, this)).second) + if (!ServerInstance->chanlist.emplace(cname, this).second) throw CoreException("Cannot create duplicate channel " + cname); } @@ -68,7 +68,7 @@ void Channel::SetTopic(User* u, const std::string& ntopic, time_t topicts, const Membership* Channel::AddUser(User* user) { - std::pair ret = userlist.insert(std::make_pair(user, insp::aligned_storage())); + std::pair ret = userlist.emplace(user, insp::aligned_storage()); if (!ret.second) return NULL; -- cgit v1.3.1-10-gc9f91