summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-06-10 12:38:40 (GMT)
committerTobias Markmann <tm@ayena.de>2016-06-10 13:11:04 (GMT)
commitf038599ba697acc17a328ef4ade5514fede8887e (patch)
tree1a7cb59f2490bbfd60fff2c92e147d93ea6d1166 /Swiften/Parser/PayloadParsers/UserLocationParser.cpp
parent33ffcd9bf5bc9806d0b404aae2aaf6d67a2945db (diff)
downloadswift-f038599ba697acc17a328ef4ade5514fede8887e.zip
swift-f038599ba697acc17a328ef4ade5514fede8887e.tar.bz2
Fix remaining compiler warnings on OS X with clang
This changes HippoMocks include to -isystem include so it will not cause compiler warnings. This changes UserLocation floating point values to double and remove remaining numerical casts. Change C++11 compiler test to not cause warnings. Test-Information: Builds with allow_warnings=0 on OS X 10.11.5 with Xcode clang. Change-Id: I26c60265a86c9be656089ade63fe9ad63851580f
Diffstat (limited to 'Swiften/Parser/PayloadParsers/UserLocationParser.cpp')
-rw-r--r--Swiften/Parser/PayloadParsers/UserLocationParser.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/Swiften/Parser/PayloadParsers/UserLocationParser.cpp b/Swiften/Parser/PayloadParsers/UserLocationParser.cpp
index 77a0fa1..09d0e9a 100644
--- a/Swiften/Parser/PayloadParsers/UserLocationParser.cpp
+++ b/Swiften/Parser/PayloadParsers/UserLocationParser.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Isode Limited.
+ * Copyright (c) 2013-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -30,16 +30,16 @@ void UserLocationParser::handleEndElement(const std::string& element, const std:
if (level == 1) {
try {
if (element == "accuracy") {
- getPayloadInternal()->setAccuracy(boost::lexical_cast<float>(currentText));
+ getPayloadInternal()->setAccuracy(boost::lexical_cast<double>(currentText));
}
else if (element == "alt") {
- getPayloadInternal()->setAltitude(boost::lexical_cast<float>(currentText));
+ getPayloadInternal()->setAltitude(boost::lexical_cast<double>(currentText));
}
else if (element == "area") {
getPayloadInternal()->setArea(currentText);
}
else if (element == "bearing") {
- getPayloadInternal()->setBearing(boost::lexical_cast<float>(currentText));
+ getPayloadInternal()->setBearing(boost::lexical_cast<double>(currentText));
}
else if (element == "building") {
getPayloadInternal()->setBuilding(currentText);
@@ -57,19 +57,19 @@ void UserLocationParser::handleEndElement(const std::string& element, const std:
getPayloadInternal()->setDescription(currentText);
}
else if (element == "error") {
- getPayloadInternal()->setError(boost::lexical_cast<float>(currentText));
+ getPayloadInternal()->setError(boost::lexical_cast<double>(currentText));
}
else if (element == "floor") {
getPayloadInternal()->setFloor(currentText);
}
else if (element == "lat") {
- getPayloadInternal()->setLatitude(boost::lexical_cast<float>(currentText));
+ getPayloadInternal()->setLatitude(boost::lexical_cast<double>(currentText));
}
else if (element == "locality") {
getPayloadInternal()->setLocality(currentText);
}
else if (element == "lon") {
- getPayloadInternal()->setLongitude(boost::lexical_cast<float>(currentText));
+ getPayloadInternal()->setLongitude(boost::lexical_cast<double>(currentText));
}
else if (element == "postalcode") {
getPayloadInternal()->setPostalCode(currentText);
@@ -81,7 +81,7 @@ void UserLocationParser::handleEndElement(const std::string& element, const std:
getPayloadInternal()->setRoom(currentText);
}
else if (element == "speed") {
- getPayloadInternal()->setSpeed(boost::lexical_cast<float>(currentText));
+ getPayloadInternal()->setSpeed(boost::lexical_cast<double>(currentText));
}
else if (element == "street") {
getPayloadInternal()->setStreet(currentText);