Skip to content

Commit

Permalink
Fixes compiler warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
xpol committed Feb 15, 2016
1 parent e970715 commit 2d12161
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rapidjson.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ struct ToLuaHandler {
return true;
}
bool Uint(unsigned u) {
if (u <= std::numeric_limits<lua_Integer>::max())
if (u <= static_cast<unsigned>(std::numeric_limits<lua_Integer>::max()))
lua_pushinteger(L, static_cast<lua_Integer>(u));
else
lua_pushnumber(L, static_cast<lua_Number>(u));
Expand All @@ -226,7 +226,7 @@ struct ToLuaHandler {
return true;
}
bool Uint64(uint64_t u) {
if (u <= std::numeric_limits<lua_Integer>::max())
if (u <= static_cast<uint64_t>(std::numeric_limits<lua_Integer>::max()))
lua_pushinteger(L, static_cast<lua_Integer>(u));
else
lua_pushnumber(L, static_cast<lua_Number>(u));
Expand Down

0 comments on commit 2d12161

Please sign in to comment.