Core/MemoryHelper: Improve PlacementNew interface
Make it possible to deduce type from arguments Former-commit-id: ed25b667fcacefcc39fddcb941ea11c40e6ce22b
This commit is contained in:
@@ -634,7 +634,7 @@ namespace Nz
|
||||
void LuaInstance::PushFunction(LuaFunction func) const
|
||||
{
|
||||
LuaFunction* luaFunc = static_cast<LuaFunction*>(lua_newuserdata(m_state, sizeof(LuaFunction)));
|
||||
PlacementNew<LuaFunction>(luaFunc, std::move(func));
|
||||
PlacementNew(luaFunc, std::move(func));
|
||||
|
||||
lua_pushcclosure(m_state, ProxyFunc, 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user