Skip to content

Commit

Permalink
[unreal]let RegisterTArray support pointer element type (#1657)
Browse files Browse the repository at this point in the history
* let RegisterTArray support pointer element type

* format code

---------

Co-authored-by: Arno <[email protected]>
  • Loading branch information
ArnoChenFx and ar-no22 authored Feb 5, 2024
1 parent 30a3644 commit a94cefc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions unreal/Puerts/Source/JsEnv/Public/UEDataBinding.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@

#define RegisterTArray(CLS) \
PUERTS_NAMESPACE::DefineClass<TArray<CLS>>() \
.Method("Add", SelectFunction(int (TArray<CLS>::*)(const CLS&), &TArray<CLS>::Add)) \
.Method("Add", SelectFunction(int (TArray<CLS>::*)(CLS const&), &TArray<CLS>::Add)) \
.Method("Get", SelectFunction(CLS& (TArray<CLS>::*) (int), &TArray<CLS>::operator[])) \
.Method("GetRef", SelectFunction(CLS& (TArray<CLS>::*) (int), &TArray<CLS>::operator[])) \
.Method("Num", MakeFunction(&TArray<CLS>::Num)) \
.Method("Contains", MakeFunction(&TArray<CLS>::Contains<CLS>)) \
.Method("FindIndex", SelectFunction(int (TArray<CLS>::*)(const CLS&) const, &TArray<CLS>::Find)) \
.Method("FindIndex", SelectFunction(int (TArray<CLS>::*)(CLS const&) const, &TArray<CLS>::Find)) \
.Method("RemoveAt", SelectFunction(void (TArray<CLS>::*)(int), &TArray<CLS>::RemoveAt)) \
.Method("IsValidIndex", MakeFunction(&TArray<CLS>::IsValidIndex)) \
.Method("Empty", MakeFunction(&TArray<CLS>::Empty)) \
Expand Down

0 comments on commit a94cefc

Please sign in to comment.