From a94cefc54fb38418752bb2a709cad22d7e4a07a5 Mon Sep 17 00:00:00 2001 From: ARNO Date: Mon, 5 Feb 2024 09:54:38 +0800 Subject: [PATCH] [unreal]let RegisterTArray support pointer element type (#1657) * let RegisterTArray support pointer element type * format code --------- Co-authored-by: Arno --- unreal/Puerts/Source/JsEnv/Public/UEDataBinding.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unreal/Puerts/Source/JsEnv/Public/UEDataBinding.hpp b/unreal/Puerts/Source/JsEnv/Public/UEDataBinding.hpp index 426c78a521..5ecd211a50 100644 --- a/unreal/Puerts/Source/JsEnv/Public/UEDataBinding.hpp +++ b/unreal/Puerts/Source/JsEnv/Public/UEDataBinding.hpp @@ -70,12 +70,12 @@ #define RegisterTArray(CLS) \ PUERTS_NAMESPACE::DefineClass>() \ - .Method("Add", SelectFunction(int (TArray::*)(const CLS&), &TArray::Add)) \ + .Method("Add", SelectFunction(int (TArray::*)(CLS const&), &TArray::Add)) \ .Method("Get", SelectFunction(CLS& (TArray::*) (int), &TArray::operator[])) \ .Method("GetRef", SelectFunction(CLS& (TArray::*) (int), &TArray::operator[])) \ .Method("Num", MakeFunction(&TArray::Num)) \ .Method("Contains", MakeFunction(&TArray::Contains)) \ - .Method("FindIndex", SelectFunction(int (TArray::*)(const CLS&) const, &TArray::Find)) \ + .Method("FindIndex", SelectFunction(int (TArray::*)(CLS const&) const, &TArray::Find)) \ .Method("RemoveAt", SelectFunction(void (TArray::*)(int), &TArray::RemoveAt)) \ .Method("IsValidIndex", MakeFunction(&TArray::IsValidIndex)) \ .Method("Empty", MakeFunction(&TArray::Empty)) \