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 /Sluift/ElementConvertors
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 'Sluift/ElementConvertors')
-rw-r--r--Sluift/ElementConvertors/UserLocationConvertor.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/Sluift/ElementConvertors/UserLocationConvertor.cpp b/Sluift/ElementConvertors/UserLocationConvertor.cpp
index 16ba41c..253ca36 100644
--- a/Sluift/ElementConvertors/UserLocationConvertor.cpp
+++ b/Sluift/ElementConvertors/UserLocationConvertor.cpp
@@ -8,8 +8,6 @@
#include <memory>
-#include <boost/numeric/conversion/cast.hpp>
-
#include <lua.hpp>
#include <Swiften/Base/DateTime.h>
@@ -32,7 +30,7 @@ std::shared_ptr<UserLocation> UserLocationConvertor::doConvertFromLua(lua_State*
lua_pop(L, 1);
lua_getfield(L, -1, "altitude");
if (lua_isnumber(L, -1)) {
- result->setAltitude(boost::numeric_cast<float>(lua_tonumber(L, -1)));
+ result->setAltitude(lua_tonumber(L, -1));
}
lua_pop(L, 1);
lua_getfield(L, -1, "locality");
@@ -42,12 +40,12 @@ std::shared_ptr<UserLocation> UserLocationConvertor::doConvertFromLua(lua_State*
lua_pop(L, 1);
lua_getfield(L, -1, "latitude");
if (lua_isnumber(L, -1)) {
- result->setLatitude(boost::numeric_cast<float>(lua_tonumber(L, -1)));
+ result->setLatitude(lua_tonumber(L, -1));
}
lua_pop(L, 1);
lua_getfield(L, -1, "accuracy");
if (lua_isnumber(L, -1)) {
- result->setAccuracy(boost::numeric_cast<float>(lua_tonumber(L, -1)));
+ result->setAccuracy(lua_tonumber(L, -1));
}
lua_pop(L, 1);
lua_getfield(L, -1, "description");
@@ -97,12 +95,12 @@ std::shared_ptr<UserLocation> UserLocationConvertor::doConvertFromLua(lua_State*
lua_pop(L, 1);
lua_getfield(L, -1, "longitude");
if (lua_isnumber(L, -1)) {
- result->setLongitude(boost::numeric_cast<float>(lua_tonumber(L, -1)));
+ result->setLongitude(lua_tonumber(L, -1));
}
lua_pop(L, 1);
lua_getfield(L, -1, "error");
if (lua_isnumber(L, -1)) {
- result->setError(boost::numeric_cast<float>(lua_tonumber(L, -1)));
+ result->setError(lua_tonumber(L, -1));
}
lua_pop(L, 1);
lua_getfield(L, -1, "postal_code");
@@ -112,7 +110,7 @@ std::shared_ptr<UserLocation> UserLocationConvertor::doConvertFromLua(lua_State*
lua_pop(L, 1);
lua_getfield(L, -1, "bearing");
if (lua_isnumber(L, -1)) {
- result->setBearing(boost::numeric_cast<float>(lua_tonumber(L, -1)));
+ result->setBearing(lua_tonumber(L, -1));
}
lua_pop(L, 1);
lua_getfield(L, -1, "text");
@@ -132,7 +130,7 @@ std::shared_ptr<UserLocation> UserLocationConvertor::doConvertFromLua(lua_State*
lua_pop(L, 1);
lua_getfield(L, -1, "speed");
if (lua_isnumber(L, -1)) {
- result->setSpeed(boost::numeric_cast<float>(lua_tonumber(L, -1)));
+ result->setSpeed(lua_tonumber(L, -1));
}
lua_pop(L, 1);
return result;