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/LinkLocal/DNSSD | |
parent | 68a93082f7ff8ede37112bf9c6cb34ad2986c6c8 (diff) | |
download | swift-7d2074bc046c38cf6947da77e1b9610c1809217d.zip swift-7d2074bc046c38cf6947da77e1b9610c1809217d.tar.bz2 |
Add a generic erase() algorithm.
Diffstat (limited to 'Swiften/LinkLocal/DNSSD')
-rw-r--r-- | Swiften/LinkLocal/DNSSD/Bonjour/BonjourQuerier.cpp | 4 | ||||
-rw-r--r-- | Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Swiften/LinkLocal/DNSSD/Bonjour/BonjourQuerier.cpp b/Swiften/LinkLocal/DNSSD/Bonjour/BonjourQuerier.cpp index 06f175c..5331964 100644 --- a/Swiften/LinkLocal/DNSSD/Bonjour/BonjourQuerier.cpp +++ b/Swiften/LinkLocal/DNSSD/Bonjour/BonjourQuerier.cpp @@ -15,6 +15,7 @@ #include <Swiften/LinkLocal/DNSSD/Bonjour/BonjourResolveServiceQuery.h> #include <Swiften/LinkLocal/DNSSD/Bonjour/BonjourResolveHostnameQuery.h> #include <Swiften/Base/foreach.h> +#include <Swiften/Base/Algorithm.h> namespace Swift { @@ -59,8 +60,7 @@ void BonjourQuerier::addRunningQuery(boost::shared_ptr<BonjourQuery> query) { void BonjourQuerier::removeRunningQuery(boost::shared_ptr<BonjourQuery> query) { { boost::lock_guard<boost::mutex> lock(runningQueriesMutex); - runningQueries.erase(std::remove( - runningQueries.begin(), runningQueries.end(), query), runningQueries.end()); + erase(runningQueries, query); } } diff --git a/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.cpp b/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.cpp index ff2b03c..1ddeffa 100644 --- a/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.cpp +++ b/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.cpp @@ -10,6 +10,7 @@ #include <iostream> #include <Swiften/Base/foreach.h> +#include <Swiften/Base/Algorithm.h> #include <Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDBrowseQuery.h> #include <Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDRegisterQuery.h> #include <Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDResolveServiceQuery.h> @@ -74,8 +75,7 @@ void FakeDNSSDQuerier::addRunningQuery(boost::shared_ptr<FakeDNSSDQuery> query) } void FakeDNSSDQuerier::removeRunningQuery(boost::shared_ptr<FakeDNSSDQuery> query) { - runningQueries.erase(std::remove( - runningQueries.begin(), runningQueries.end(), query), runningQueries.end()); + erase(runningQueries, query); } void FakeDNSSDQuerier::addService(const DNSSDServiceID& id) { |