MCPcopy Create free account
hub / github.com/Tencent/UnLua / Write

Method Write

Plugins/UnLua/Source/UnLua/Public/UnLuaLegacy.h:868–873  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

866 }
867
868 virtual void Write(lua_State* L, void* ContainerPtr, int32 IndexInStack) const override
869 {
870 static_assert(TIsCopyConstructible<T>::Value, "type must be copy constructible!");
871 T V = UnLua::Get(L, IndexInStack, TType<T>());
872 CopyInternal((T*)ContainerPtr, &V, typename TChooseClass<TIsTriviallyCopyConstructible<T>::Value, FTrue, FFalse>::Result());
873 }
874
875 private:
876 void CopyInternal(T* Dest, const T* Src, FFalse NotTrivial) const { new(Dest) T(*Src); }

Callers 1

CMakeMethod · 0.45

Calls 1

GetFunction · 0.70

Tested by

no test coverage detected