diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-01-18 13:22:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-18 13:22:35 +0100 |
commit | 9912492e937d2454a21ec7465538aab2431ac249 (patch) | |
tree | 4afd7886de16fabdd4da07f3922f68c55b0cb6a8 /core/variant/array.h | |
parent | 366d3930ac96db5561afd23b1063085fccf6dcd6 (diff) | |
parent | c6cefb1b79d207af1bc78ce20c01b5788e806252 (diff) |
Merge pull request #56668 from akien-mga/array-slice-nicer-bound-checks
Diffstat (limited to 'core/variant/array.h')
-rw-r--r-- | core/variant/array.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/variant/array.h b/core/variant/array.h index f48444bb39..72bed5932c 100644 --- a/core/variant/array.h +++ b/core/variant/array.h @@ -33,6 +33,8 @@ #include "core/typedefs.h" +#include <climits> + class Variant; class ArrayPrivate; class Object; @@ -102,7 +104,7 @@ public: Array duplicate(bool p_deep = false) const; Array recursive_duplicate(bool p_deep, int recursion_count) const; - Array slice(int p_begin, int p_end, int p_step = 1, bool p_deep = false) const; + Array slice(int p_begin, int p_end = INT_MAX, int p_step = 1, bool p_deep = false) const; Array filter(const Callable &p_callable) const; Array map(const Callable &p_callable) const; Variant reduce(const Callable &p_callable, const Variant &p_accum) const; |