Additional nullptr's for GCC's whining ass, and more reinterpret casts. Also for GCC's whiny ass.

This commit is contained in:
ThePhD 2013-12-09 00:04:37 -05:00
parent 2d2ad59492
commit 51f7010363
2 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ struct static_lua_func {
void* functiondata = lua_touserdata(L, lua_upvalueindex(1)); void* functiondata = lua_touserdata(L, lua_upvalueindex(1));
//if (functiondata == nullptr) //if (functiondata == nullptr)
// throw sol_error("call from lua to c++ function has null function pointer data"); // throw sol_error("call from lua to c++ function has null function pointer data");
fx_t* fx = *static_cast<fx_t*>(functiondata); fx_t* fx = reinterpret_cast<fx_t*>(functiondata);
int r = typed_call(tuple_types<typename fx_traits::return_type>(), typename fx_traits::args_type(), fx, L); int r = typed_call(tuple_types<typename fx_traits::return_type>(), typename fx_traits::args_type(), fx, L);
return r; return r;
} }

View File

@ -151,7 +151,7 @@ private:
const char* freefuncname = fkey.c_str(); const char* freefuncname = fkey.c_str();
const luaL_Reg funcreg[ 2 ] = { const luaL_Reg funcreg[ 2 ] = {
{ freefuncname, freefunc }, { freefuncname, freefunc },
{ } { nullptr, nullptr }
}; };