summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-05-25 14:04:15 (GMT)
committerTobias Markmann <tm@ayena.de>2016-05-25 14:04:15 (GMT)
commit57eb5cdb61b34a83030eee6a3fe2973d2c2fd48f (patch)
tree6035bb5883faed4e84261473bc77a1318c92c977 /Swiften/Parser
parentb2d3eae9fd085cd91b3efac53dca81fd450d5393 (diff)
downloadswift-57eb5cdb61b34a83030eee6a3fe2973d2c2fd48f.zip
swift-57eb5cdb61b34a83030eee6a3fe2973d2c2fd48f.tar.bz2
Remove unnecessary include of iostream header
Move std::cout/cerr logging to SWIFT_LOG. Test-Information: Builds and all tests pass on OS X 10.11.5. Change-Id: I0a0c24654a8b3abf3244a79fd6d970eee90559d0
Diffstat (limited to 'Swiften/Parser')
-rw-r--r--Swiften/Parser/ExpatParser.cpp5
-rw-r--r--Swiften/Parser/IQParser.cpp6
-rw-r--r--Swiften/Parser/LibXMLParser.cpp4
-rw-r--r--Swiften/Parser/PayloadParsers/FormParser.cpp1
-rw-r--r--Swiften/Parser/PayloadParsers/MUCItemParser.cpp1
-rw-r--r--Swiften/Parser/PresenceParser.cpp6
-rw-r--r--Swiften/Parser/StanzaParser.cpp1
-rw-r--r--Swiften/Parser/Tree/ParserElement.cpp2
-rw-r--r--Swiften/Parser/XMPPParser.cpp1
9 files changed, 11 insertions, 16 deletions
diff --git a/Swiften/Parser/ExpatParser.cpp b/Swiften/Parser/ExpatParser.cpp
index fba82e2..2a6b227 100644
--- a/Swiften/Parser/ExpatParser.cpp
+++ b/Swiften/Parser/ExpatParser.cpp
@@ -1,14 +1,15 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <Swiften/Parser/ExpatParser.h>
-#include <iostream>
#include <string>
+
#include <expat.h>
+
#include <boost/numeric/conversion/cast.hpp>
#include <Swiften/Base/String.h>
diff --git a/Swiften/Parser/IQParser.cpp b/Swiften/Parser/IQParser.cpp
index 573ce07..5cfae34 100644
--- a/Swiften/Parser/IQParser.cpp
+++ b/Swiften/Parser/IQParser.cpp
@@ -6,10 +6,10 @@
#include <Swiften/Parser/IQParser.h>
-#include <iostream>
-
#include <boost/optional.hpp>
+#include <Swiften/Base/Log.h>
+
namespace Swift {
IQParser::IQParser(PayloadParserFactoryCollection* factories) :
@@ -32,7 +32,7 @@ void IQParser::handleStanzaAttributes(const AttributeMap& attributes) {
getStanzaGeneric()->setType(IQ::Error);
}
else {
- std::cerr << "Unknown IQ type: " << *type << std::endl;
+ SWIFT_LOG(warning) << "Unknown IQ type: " << *type << std::endl;
getStanzaGeneric()->setType(IQ::Get);
}
}
diff --git a/Swiften/Parser/LibXMLParser.cpp b/Swiften/Parser/LibXMLParser.cpp
index 10de4f8..a880141 100644
--- a/Swiften/Parser/LibXMLParser.cpp
+++ b/Swiften/Parser/LibXMLParser.cpp
@@ -8,13 +8,13 @@
#include <cassert>
#include <cstring>
-#include <iostream>
#include <string>
#include <boost/numeric/conversion/cast.hpp>
#include <libxml/parser.h>
+#include <Swiften/Base/Log.h>
#include <Swiften/Parser/XMLParserClient.h>
namespace Swift {
@@ -28,7 +28,7 @@ static void handleStartElement(void* parser, const xmlChar* name, const xmlChar*
AttributeMap attributeValues;
if (nbDefaulted != 0) {
// Just because i don't understand what this means yet :-)
- std::cerr << "Unexpected nbDefaulted on XML element" << std::endl;
+ SWIFT_LOG(error) << "Unexpected nbDefaulted on XML element" << std::endl;
}
for (int i = 0; i < nbAttributes*5; i += 5) {
std::string attributeNS = "";
diff --git a/Swiften/Parser/PayloadParsers/FormParser.cpp b/Swiften/Parser/PayloadParsers/FormParser.cpp
index 4a0a26f..5ea75c5 100644
--- a/Swiften/Parser/PayloadParsers/FormParser.cpp
+++ b/Swiften/Parser/PayloadParsers/FormParser.cpp
@@ -5,7 +5,6 @@
*/
#include <Swiften/Parser/PayloadParsers/FormParser.h>
-#include <iostream>
#include <map>
#include <Swiften/Base/foreach.h>
diff --git a/Swiften/Parser/PayloadParsers/MUCItemParser.cpp b/Swiften/Parser/PayloadParsers/MUCItemParser.cpp
index 0486cb4..ce74671 100644
--- a/Swiften/Parser/PayloadParsers/MUCItemParser.cpp
+++ b/Swiften/Parser/PayloadParsers/MUCItemParser.cpp
@@ -7,7 +7,6 @@
#include <Swiften/Parser/PayloadParsers/MUCItemParser.h>
#include <cassert>
-#include <iostream>
#include <boost/lexical_cast.hpp>
diff --git a/Swiften/Parser/PresenceParser.cpp b/Swiften/Parser/PresenceParser.cpp
index 4a27a24..0235a12 100644
--- a/Swiften/Parser/PresenceParser.cpp
+++ b/Swiften/Parser/PresenceParser.cpp
@@ -6,10 +6,10 @@
#include <Swiften/Parser/PresenceParser.h>
-#include <iostream>
-
#include <boost/optional.hpp>
+#include <Swiften/Base/Log.h>
+
namespace Swift {
PresenceParser::PresenceParser(PayloadParserFactoryCollection* factories) :
@@ -41,7 +41,7 @@ void PresenceParser::handleStanzaAttributes(const AttributeMap& attributes) {
getStanzaGeneric()->setType(Presence::Error);
}
else {
- std::cerr << "Unknown Presence type: " << *type << std::endl;
+ SWIFT_LOG(error) << "Unknown Presence type: " << *type << std::endl;
getStanzaGeneric()->setType(Presence::Available);
}
}
diff --git a/Swiften/Parser/StanzaParser.cpp b/Swiften/Parser/StanzaParser.cpp
index da252bf..8be4103 100644
--- a/Swiften/Parser/StanzaParser.cpp
+++ b/Swiften/Parser/StanzaParser.cpp
@@ -7,7 +7,6 @@
#include <Swiften/Parser/StanzaParser.h>
#include <cassert>
-#include <iostream>
#include <boost/optional.hpp>
diff --git a/Swiften/Parser/Tree/ParserElement.cpp b/Swiften/Parser/Tree/ParserElement.cpp
index 27bd790..5415945 100644
--- a/Swiften/Parser/Tree/ParserElement.cpp
+++ b/Swiften/Parser/Tree/ParserElement.cpp
@@ -7,8 +7,6 @@
#include <Swiften/Parser/Tree/ParserElement.h>
-#include <iostream>
-
#include <boost/lambda/bind.hpp>
#include <boost/lambda/lambda.hpp>
diff --git a/Swiften/Parser/XMPPParser.cpp b/Swiften/Parser/XMPPParser.cpp
index 29c02a0..2b45a12 100644
--- a/Swiften/Parser/XMPPParser.cpp
+++ b/Swiften/Parser/XMPPParser.cpp
@@ -7,7 +7,6 @@
#include <Swiften/Parser/XMPPParser.h>
#include <cassert>
-#include <iostream>
#include <string>
#include <Swiften/Elements/ProtocolHeader.h>