summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMateusz Piekos <mateuszpiekos@gmail.com>2012-07-20 10:24:26 (GMT)
committerMateusz Piekos <mateuszpiekos@gmail.com>2012-07-20 10:24:26 (GMT)
commitb4384bde09c72dde1620478c98fc20eb76529f3f (patch)
tree59a7bca1f9b8e77138cb0b28ae7848356f3252c8 /Swiften/Parser/PayloadParsers
parentedeab9429a996aa5641cfb9c4b3fc1386b49d81f (diff)
downloadswift-contrib-b4384bde09c72dde1620478c98fc20eb76529f3f.zip
swift-contrib-b4384bde09c72dde1620478c98fc20eb76529f3f.tar.bz2
Made compilation of whiteboard components warning free
Diffstat (limited to 'Swiften/Parser/PayloadParsers')
-rw-r--r--Swiften/Parser/PayloadParsers/WhiteboardParser.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/Swiften/Parser/PayloadParsers/WhiteboardParser.cpp b/Swiften/Parser/PayloadParsers/WhiteboardParser.cpp
index cdcbb8c..0381abb 100644
--- a/Swiften/Parser/PayloadParsers/WhiteboardParser.cpp
+++ b/Swiften/Parser/PayloadParsers/WhiteboardParser.cpp
@@ -21,7 +21,6 @@
namespace Swift {
WhiteboardParser::WhiteboardParser() : actualIsText(false), level_(0) {
- operation = NULL;
}
void WhiteboardParser::handleStartElement(const std::string& element, const std::string&, const AttributeMap& attributes) {
@@ -81,8 +80,8 @@ namespace Swift {
std::string pathData = attributes.getAttributeValue("d").get_value_or("");
std::vector<std::pair<int, int> > points;
if (pathData[0] == 'M') {
- int pos = 1;
- int npos;
+ unsigned int pos = 1;
+ unsigned int npos;
int x, y;
if (pathData[pos] == ' ') {
pos++;
@@ -161,8 +160,8 @@ namespace Swift {
std::string pointsData = attributes.getAttributeValue("points").get_value_or("");
std::vector<std::pair<int, int> > points;
- int pos = 0;
- int npos;
+ unsigned int pos = 0;
+ unsigned int npos;
int x, y;
try {
while (pos < pointsData.size()) {
@@ -286,7 +285,7 @@ namespace Swift {
}
WhiteboardPayload::Type WhiteboardParser::stringToType(const std::string& type) const {
- if (type.empty()) {
+ if (type == "data") {
return WhiteboardPayload::Data;
} else if (type == "session-request") {
return WhiteboardPayload::SessionRequest;
@@ -294,6 +293,8 @@ namespace Swift {
return WhiteboardPayload::SessionAccept;
} else if (type == "session-terminate") {
return WhiteboardPayload::SessionTerminate;
+ } else {
+ return WhiteboardPayload::UnknownType;
}
}