From 5434e946ee280dcc1dc7e0951bfa1ccc3054e6ab Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 4 Nov 2007 00:54:07 +0000 Subject: There are two forms of map::erase(), one erases by key the other by iterator. if we erase by key, this involves a second search to find that key. Fix to pass the iterator instead and avoid the second map search :) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8488 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/bancache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/bancache.cpp b/src/bancache.cpp index fe23fd0b7..a831b1219 100644 --- a/src/bancache.cpp +++ b/src/bancache.cpp @@ -56,7 +56,7 @@ bool BanCacheManager::RemoveHit(BanCacheHit *b) } else { - this->BanHash->erase(b->IP); + this->BanHash->erase(i); } delete b; -- cgit v1.2.3