From fbc73e20784b055485f676096e758d6aeed62e0c Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Sat, 1 Nov 2014 18:17:04 +0100 Subject: Add stdalgo::erase() and use it to simplify code --- src/modules/m_dccallow.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/modules/m_dccallow.cpp') diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp index cc7fbd323..1b838be5c 100644 --- a/src/modules/m_dccallow.cpp +++ b/src/modules/m_dccallow.cpp @@ -268,11 +268,7 @@ class ModuleDCCAllow : public Module // remove their DCCALLOW list if they have one if (udl) - { - userlist::iterator it = std::find(ul.begin(), ul.end(), user); - if (it != ul.end()) - ul.erase(it); - } + stdalgo::erase(ul, user); // remove them from any DCCALLOW lists // they are currently on -- cgit v1.3.1-10-gc9f91