diff options
| author | 2007-11-04 00:54:07 +0000 | |
|---|---|---|
| committer | 2007-11-04 00:54:07 +0000 | |
| commit | 5434e946ee280dcc1dc7e0951bfa1ccc3054e6ab (patch) | |
| tree | c717979cf08c1077b13d029d148c6daa5a189d6b /src/bancache.cpp | |
| parent | Remove some unnecessary headers from places, commit working BanCacheManager s... (diff) | |
| download | inspircd++-5434e946ee280dcc1dc7e0951bfa1ccc3054e6ab.tar.gz inspircd++-5434e946ee280dcc1dc7e0951bfa1ccc3054e6ab.tar.bz2 inspircd++-5434e946ee280dcc1dc7e0951bfa1ccc3054e6ab.zip | |
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
Diffstat (limited to 'src/bancache.cpp')
| -rw-r--r-- | src/bancache.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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; |
