diff options
author | Kazuo256 <kazuo256@gmail.com> | 2016-11-18 18:30:16 -0200 |
---|---|---|
committer | Kazuo256 <kazuo256@gmail.com> | 2016-11-18 18:45:51 -0200 |
commit | bf4fda64fd403d589278919cff01c3207164207e (patch) | |
tree | bed9a1d2244b31ec27a40fa18cda6c6357608379 /core/variant_call.cpp | |
parent | 959683c3d8f7aaa7469d5758c7698e0da108b406 (diff) |
Add Array.front() and Array.back()
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 9b6fa27cf4..0379ae019b 100644 --- a/core/variant_call.cpp +++ b/core/variant_call.cpp @@ -472,6 +472,8 @@ static void _call_##m_type##_##m_method(Variant& r_ret,Variant& p_self,const Var VCALL_LOCALMEM1(Array,resize); VCALL_LOCALMEM2(Array,insert); VCALL_LOCALMEM1(Array,remove); + VCALL_LOCALMEM0R(Array,front); + VCALL_LOCALMEM0R(Array,back); VCALL_LOCALMEM2R(Array,find); VCALL_LOCALMEM2R(Array,rfind); VCALL_LOCALMEM1R(Array,find_last); @@ -1576,6 +1578,8 @@ _VariantCall::addfunc(Variant::m_vtype,Variant::m_ret,_SCS(#m_method),VCALL(m_cl ADDFUNC2(ARRAY,NIL,Array,insert,INT,"pos",NIL,"value",varray()); ADDFUNC1(ARRAY,NIL,Array,remove,INT,"pos",varray()); ADDFUNC1(ARRAY,NIL,Array,erase,NIL,"value",varray()); + ADDFUNC0(ARRAY,NIL,Array,front,varray()); + ADDFUNC0(ARRAY,NIL,Array,back,varray()); ADDFUNC2(ARRAY,INT,Array,find,NIL,"what",INT,"from",varray(0)); ADDFUNC2(ARRAY,INT,Array,rfind,NIL,"what",INT,"from",varray(-1)); ADDFUNC1(ARRAY,INT,Array,find_last,NIL,"value",varray()); |