diff options
author | kobewi <kobewi4e@gmail.com> | 2021-02-04 02:02:06 +0100 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2021-02-04 14:37:52 +0100 |
commit | fb83d905daed6c2a7c4f95712d47815c7ccd8f2e (patch) | |
tree | 090c38558753513186bbd2ff92a93c88ea7d13b4 /core/variant/array.h | |
parent | 5f8f049ddb1f322d48b35eec27d594d8eb97acd6 (diff) |
Change sort_custom/bsearch_custom to use Callables
Diffstat (limited to 'core/variant/array.h')
-rw-r--r-- | core/variant/array.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/variant/array.h b/core/variant/array.h index 26de5477b4..d8f2402330 100644 --- a/core/variant/array.h +++ b/core/variant/array.h @@ -37,6 +37,7 @@ class Variant; class ArrayPrivate; class Object; class StringName; +class Callable; class Array { mutable ArrayPrivate *_p; @@ -78,10 +79,10 @@ public: Variant back() const; void sort(); - void sort_custom(Object *p_obj, const StringName &p_function); + void sort_custom(Callable p_callable); void shuffle(); int bsearch(const Variant &p_value, bool p_before = true); - int bsearch_custom(const Variant &p_value, Object *p_obj, const StringName &p_function, bool p_before = true); + int bsearch_custom(const Variant &p_value, Callable p_callable, bool p_before = true); void invert(); int find(const Variant &p_value, int p_from = 0) const; |