From 51f7010363fd49a987e7b23b7c85a5aee380c218 Mon Sep 17 00:00:00 2001 From: ThePhD Date: Mon, 9 Dec 2013 00:04:37 -0500 Subject: [PATCH] Additional `nullptr`'s for GCC's whining ass, and more reinterpret casts. Also for GCC's whiny ass. --- sol/lua_function.hpp | 2 +- sol/table.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sol/lua_function.hpp b/sol/lua_function.hpp index 78a9d38d..e2bd98ca 100644 --- a/sol/lua_function.hpp +++ b/sol/lua_function.hpp @@ -49,7 +49,7 @@ struct static_lua_func { void* functiondata = lua_touserdata(L, lua_upvalueindex(1)); //if (functiondata == nullptr) // throw sol_error("call from lua to c++ function has null function pointer data"); - fx_t* fx = *static_cast(functiondata); + fx_t* fx = reinterpret_cast(functiondata); int r = typed_call(tuple_types(), typename fx_traits::args_type(), fx, L); return r; } diff --git a/sol/table.hpp b/sol/table.hpp index c4e00ccd..b849cc60 100644 --- a/sol/table.hpp +++ b/sol/table.hpp @@ -151,7 +151,7 @@ private: const char* freefuncname = fkey.c_str(); const luaL_Reg funcreg[ 2 ] = { { freefuncname, freefunc }, - { } + { nullptr, nullptr } };