diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2016-06-04 16:07:48 +0200 |
---|---|---|
committer | Rémi Verschelde <remi@verschelde.fr> | 2016-06-04 16:07:48 +0200 |
commit | 4b0bae97998dc337c0ca3cfb84332fe2d06d3433 (patch) | |
tree | 01b985e9b4d0065b023c8e1b38dee18053292c06 /core/variant_call.cpp | |
parent | 992a76b41a59de8aad28cf6bce918e7d17970e4e (diff) | |
parent | 5f5ca8cd9b323e3a89940afd5df09099f83d1473 (diff) |
Merge pull request #5027 from J08nY/gdscript
Add Array.find_last() and Array.count()
Diffstat (limited to 'core/variant_call.cpp')
-rw-r--r-- | core/variant_call.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/variant_call.cpp b/core/variant_call.cpp index 4be763a511..f5dcd75691 100644 --- a/core/variant_call.cpp +++ b/core/variant_call.cpp @@ -463,6 +463,8 @@ static void _call_##m_type##_##m_method(Variant& r_ret,Variant& p_self,const Var VCALL_LOCALMEM2(Array,insert); VCALL_LOCALMEM1(Array,remove); VCALL_LOCALMEM1R(Array,find); + VCALL_LOCALMEM1R(Array,find_last); + VCALL_LOCALMEM1R(Array,count); VCALL_LOCALMEM1(Array,erase); VCALL_LOCALMEM0(Array,sort); VCALL_LOCALMEM2(Array,sort_custom); @@ -1448,6 +1450,8 @@ _VariantCall::addfunc(Variant::m_vtype,Variant::m_ret,_SCS(#m_method),VCALL(m_cl ADDFUNC1(ARRAY,NIL,Array,remove,INT,"pos",varray()); ADDFUNC1(ARRAY,NIL,Array,erase,NIL,"value",varray()); ADDFUNC1(ARRAY,INT,Array,find,NIL,"value",varray()); + ADDFUNC1(ARRAY,INT,Array,find_last,NIL,"value",varray()); + ADDFUNC1(ARRAY,INT,Array,count,NIL,"value",varray()); ADDFUNC0(ARRAY,NIL,Array,pop_back,varray()); ADDFUNC0(ARRAY,NIL,Array,pop_front,varray()); ADDFUNC0(ARRAY,NIL,Array,sort,varray()); |