Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Shared/mods/deathmatch/logic/lua/LuaBasic.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,20 @@ namespace lua
return 1;
}

template <typename T>
int Push(lua_State* L, const std::shared_ptr<T>& ptr)
{
lua_pushelement(L, ptr.get());
return 1;
}

template <typename T>
int Push(lua_State* L, const std::unique_ptr<T>& ptr)
{
lua_pushelement(L, ptr.get());
return 1;
}

/*****************************************************************\
* The functions below may depend on each other, so they need to be
* forward declared.
Expand Down