diff options
-rw-r--r-- | src/usermanager.cpp | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/usermanager.cpp b/src/usermanager.cpp index 3742c855d..bb4d58d90 100644 --- a/src/usermanager.cpp +++ b/src/usermanager.cpp @@ -243,23 +243,12 @@ void UserManager::QuitUser(User *user, const std::string &quitreason, const char void UserManager::AddLocalClone(User *user) { - clonemap::iterator x; - x = local_clones.find(user->GetCIDRMask()); - if (x != local_clones.end()) - x->second++; - else - local_clones[user->GetCIDRMask()] = 1; + local_clones[user->GetCIDRMask()]++; } void UserManager::AddGlobalClone(User *user) { - clonemap::iterator x; - - x = global_clones.find(user->GetCIDRMask()); - if (x != global_clones.end()) - x->second++; - else - global_clones[user->GetCIDRMask()] = 1; + global_clones[user->GetCIDRMask()]++; } void UserManager::RemoveCloneCounts(User *user) |