diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-05-02 20:05:08 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-05-02 20:19:31 (GMT) |
commit | 7d2074bc046c38cf6947da77e1b9610c1809217d (patch) | |
tree | 3ddb60ea83873023db964b8353c58ffb5d7df250 /Swiften/Queries | |
parent | 68a93082f7ff8ede37112bf9c6cb34ad2986c6c8 (diff) | |
download | swift-7d2074bc046c38cf6947da77e1b9610c1809217d.zip swift-7d2074bc046c38cf6947da77e1b9610c1809217d.tar.bz2 |
Add a generic erase() algorithm.
Diffstat (limited to 'Swiften/Queries')
-rw-r--r-- | Swiften/Queries/IQRouter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Swiften/Queries/IQRouter.cpp b/Swiften/Queries/IQRouter.cpp index 4e23389..65f9d7f 100644 --- a/Swiften/Queries/IQRouter.cpp +++ b/Swiften/Queries/IQRouter.cpp @@ -6,9 +6,9 @@ #include <Swiften/Queries/IQRouter.h> -#include <algorithm> #include <boost/bind.hpp> +#include <Swiften/Base/Algorithm.h> #include <Swiften/Base/foreach.h> #include <Swiften/Queries/IQHandler.h> #include <Swiften/Queries/IQChannel.h> @@ -54,7 +54,7 @@ void IQRouter::handleIQ(boost::shared_ptr<IQ> iq) { void IQRouter::processPendingRemoves() { foreach(boost::shared_ptr<IQHandler> handler, queuedRemoves_) { - handlers_.erase(std::remove(handlers_.begin(), handlers_.end(), handler), handlers_.end()); + erase(handlers_, handler); } queuedRemoves_.clear(); } @@ -76,7 +76,7 @@ void IQRouter::removeHandler(boost::shared_ptr<IQHandler> handler) { queuedRemoves_.push_back(handler); } else { - handlers_.erase(std::remove(handlers_.begin(), handlers_.end(), handler), handlers_.end()); + erase(handlers_, handler); } } |