diff options
author | Remko Tronçon <git@el-tramo.be> | 2012-12-30 16:47:37 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2012-12-30 18:03:54 (GMT) |
commit | 96b31c598f5c229c3acc0579ddfe22dd503e2b9d (patch) | |
tree | d73db22e591e49f088f359b9876df232eb99c6a9 /Sluift/Lua | |
parent | b19210aa48e7cea40929593daed997668fe789be (diff) | |
download | swift-96b31c598f5c229c3acc0579ddfe22dd503e2b9d.zip swift-96b31c598f5c229c3acc0579ddfe22dd503e2b9d.tar.bz2 |
Enable & fix pedantic CLang warnings.
Change-Id: I70109624b4bd7aab9ba679a3eaabc225dd64a03a
Diffstat (limited to 'Sluift/Lua')
-rw-r--r-- | Sluift/Lua/Value.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Sluift/Lua/Value.cpp b/Sluift/Lua/Value.cpp index 3164ec6..817cbf3 100644 --- a/Sluift/Lua/Value.cpp +++ b/Sluift/Lua/Value.cpp @@ -8,6 +8,7 @@ #include <lualib.h> #include <boost/variant/apply_visitor.hpp> +#include <boost/numeric/conversion/cast.hpp> #include <Swiften/Base/foreach.h> using namespace Swift; @@ -35,15 +36,15 @@ namespace { } void operator()(const std::vector<Value>& values) const { - lua_createtable(state, values.size(), 0); + lua_createtable(state, boost::numeric_cast<int>(values.size()), 0); for(size_t i = 0; i < values.size(); ++i) { boost::apply_visitor(PushVisitor(state), values[i]); - lua_rawseti(state, -2, i + 1); + lua_rawseti(state, -2, boost::numeric_cast<int>(i + 1)); } } void operator()(const std::map<std::string, boost::shared_ptr<Value> >& table) const { - lua_createtable(state, 0, table.size()); + lua_createtable(state, 0, boost::numeric_cast<int>(table.size())); for(std::map<std::string, boost::shared_ptr<Value> >::const_iterator i = table.begin(); i != table.end(); ++i) { boost::apply_visitor(PushVisitor(state), *i->second); lua_setfield(state, -2, i->first.c_str()); |