diff --git a/include/lua/lua_state.h b/include/lua/lua_state.h index 3bc80f1..0ffee8c 100644 --- a/include/lua/lua_state.h +++ b/include/lua/lua_state.h @@ -134,7 +134,15 @@ class LuaState { std::optional> popFunction(bool always_pop = false); void pushOne(double value); - void pushOne(int value); + // NOLINTBEGIN(google-runtime-int) + // TODO: use template instead + void pushOne(unsigned int value) { pushOne(static_cast(value)); } + void pushOne(int value) { pushOne(static_cast(value)); } + void pushOne(unsigned long value) { pushOne(static_cast(value)); } + void pushOne(long value) { pushOne(static_cast(value)); } + void pushOne(unsigned long long value) { pushOne(static_cast(value)); } + void pushOne(long long value); + // NOLINTEND(google-runtime-int) void pushOne(const char* value); void pushOne(std::string_view value); void pushOne(bool value); @@ -259,7 +267,6 @@ auto LuaState::topFunction() } return std::optional { std::nullopt }; } - } // namespace ppplugin #endif // PPPLUGIN_LUA_STATE_H diff --git a/src/lua_state.cpp b/src/lua_state.cpp index 6c75962..911c342 100644 --- a/src/lua_state.cpp +++ b/src/lua_state.cpp @@ -77,7 +77,8 @@ void LuaState::pushOne(double value) lua_pushnumber(state(), value); } -void LuaState::pushOne(int value) +// NOLINTNEXTLINE(google-runtime-int) +void LuaState::pushOne(long long value) { lua_pushinteger(state(), value); }