From 2d6d47b489d733ca3c29fc2f963d424029fcb929 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Wed, 11 Nov 2020 02:25:06 +0000 Subject: Add stdalgo::equal_range and switch more stuff to iterator_range. --- src/modules/m_customtitle.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/modules/m_customtitle.cpp') diff --git a/src/modules/m_customtitle.cpp b/src/modules/m_customtitle.cpp index 6dca396ac..d98ded7b7 100644 --- a/src/modules/m_customtitle.cpp +++ b/src/modules/m_customtitle.cpp @@ -66,7 +66,6 @@ struct CustomTitle }; typedef std::multimap CustomVhostMap; -typedef std::pair MatchingConfigs; /** Handle /TITLE */ @@ -85,11 +84,8 @@ class CommandTitle : public Command CmdResult Handle(User* user, const Params& parameters) override { - MatchingConfigs matching = configs.equal_range(parameters[0]); - - for (MatchingConfigs::first_type i = matching.first; i != matching.second; ++i) + for (const auto& [_, config] : stdalgo::equal_range(configs, parameters[0])) { - CustomTitle config = i->second; if (config.MatchUser(user) && config.CheckPass(user, parameters[1])) { ctitle.set(user, config.title); -- cgit v1.3.1-10-gc9f91