summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Parser/PayloadParsers/MUCOwnerPayloadParser.cpp')
-rw-r--r--Swiften/Parser/PayloadParsers/MUCOwnerPayloadParser.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/Swiften/Parser/PayloadParsers/MUCOwnerPayloadParser.cpp b/Swiften/Parser/PayloadParsers/MUCOwnerPayloadParser.cpp
index b4cc7b6..7e7c0d4 100644
--- a/Swiften/Parser/PayloadParsers/MUCOwnerPayloadParser.cpp
+++ b/Swiften/Parser/PayloadParsers/MUCOwnerPayloadParser.cpp
@@ -15,36 +15,36 @@ MUCOwnerPayloadParser::MUCOwnerPayloadParser(PayloadParserFactoryCollection* fac
}
void MUCOwnerPayloadParser::handleStartElement(const std::string& element, const std::string& ns, const AttributeMap& attributes) {
- if (level == 1) {
- PayloadParserFactory* payloadParserFactory = factories->getPayloadParserFactory(element, ns, attributes);
- if (payloadParserFactory) {
- currentPayloadParser.reset(payloadParserFactory->createPayloadParser());
- }
- }
-
- if (level >= 1 && currentPayloadParser) {
- currentPayloadParser->handleStartElement(element, ns, attributes);
- }
- ++level;
+ if (level == 1) {
+ PayloadParserFactory* payloadParserFactory = factories->getPayloadParserFactory(element, ns, attributes);
+ if (payloadParserFactory) {
+ currentPayloadParser.reset(payloadParserFactory->createPayloadParser());
+ }
+ }
+
+ if (level >= 1 && currentPayloadParser) {
+ currentPayloadParser->handleStartElement(element, ns, attributes);
+ }
+ ++level;
}
void MUCOwnerPayloadParser::handleEndElement(const std::string& element, const std::string& ns) {
- --level;
- if (currentPayloadParser) {
- if (level >= 1) {
- currentPayloadParser->handleEndElement(element, ns);
- }
-
- if (level == 1) {
- getPayloadInternal()->setPayload(currentPayloadParser->getPayload());
- }
- }
+ --level;
+ if (currentPayloadParser) {
+ if (level >= 1) {
+ currentPayloadParser->handleEndElement(element, ns);
+ }
+
+ if (level == 1) {
+ getPayloadInternal()->setPayload(currentPayloadParser->getPayload());
+ }
+ }
}
void MUCOwnerPayloadParser::handleCharacterData(const std::string& data) {
- if (level > 1 && currentPayloadParser) {
- currentPayloadParser->handleCharacterData(data);
- }
+ if (level > 1 && currentPayloadParser) {
+ currentPayloadParser->handleCharacterData(data);
+ }
}
}