summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Parser/PayloadParserFactoryCollection.cpp')
-rw-r--r--Swiften/Parser/PayloadParserFactoryCollection.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Swiften/Parser/PayloadParserFactoryCollection.cpp b/Swiften/Parser/PayloadParserFactoryCollection.cpp
index 6b86305..f1c1c03 100644
--- a/Swiften/Parser/PayloadParserFactoryCollection.cpp
+++ b/Swiften/Parser/PayloadParserFactoryCollection.cpp
@@ -18,22 +18,22 @@ PayloadParserFactoryCollection::PayloadParserFactoryCollection() : defaultFactor
}
void PayloadParserFactoryCollection::addFactory(PayloadParserFactory* factory) {
- factories_.push_back(factory);
+ factories_.push_back(factory);
}
void PayloadParserFactoryCollection::removeFactory(PayloadParserFactory* factory) {
- factories_.erase(std::remove(factories_.begin(), factories_.end(), factory), factories_.end());
+ factories_.erase(std::remove(factories_.begin(), factories_.end(), factory), factories_.end());
}
void PayloadParserFactoryCollection::setDefaultFactory(PayloadParserFactory* factory) {
- defaultFactory_ = factory;
+ defaultFactory_ = factory;
}
PayloadParserFactory* PayloadParserFactoryCollection::getPayloadParserFactory(const std::string& element, const std::string& ns, const AttributeMap& attributes) {
- std::vector<PayloadParserFactory*>::reverse_iterator i = std::find_if(
- factories_.rbegin(), factories_.rend(),
- boost::bind(&PayloadParserFactory::canParse, _1, element, ns, attributes));
- return (i != factories_.rend() ? *i : defaultFactory_);
+ std::vector<PayloadParserFactory*>::reverse_iterator i = std::find_if(
+ factories_.rbegin(), factories_.rend(),
+ boost::bind(&PayloadParserFactory::canParse, _1, element, ns, attributes));
+ return (i != factories_.rend() ? *i : defaultFactory_);
}
}