| 960 | struct TGenericTypeHelper |
| 961 | { |
| 962 | static int32 Push(lua_State* L, T&& V, bool bCopy) |
| 963 | { |
| 964 | if (bCopy) |
| 965 | { |
| 966 | void* Userdata = UnLua::NewUserdata(L, sizeof(typename TDecay<T>::Type), TType<typename TDecay<T>::Type>::GetName(), alignof(typename TDecay<T>::Type)); |
| 967 | if (!Userdata) |
| 968 | { |
| 969 | return 0; |
| 970 | } |
| 971 | new(Userdata) typename TDecay<T>::Type(V); |
| 972 | return 1; |
| 973 | } |
| 974 | return TPointerHelper<typename TRemoveReference<T>::Type>::Push(L, &V); |
| 975 | } |
| 976 | |
| 977 | static T Get(lua_State* L, int32 Index) |
| 978 | { |
nothing calls this directly
no test coverage detected