diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-02-05 09:30:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-05 09:30:19 +0100 |
commit | d93f75fae5766c029af9eb28b7a5593d96f66750 (patch) | |
tree | 500bb716de953327f48a2fa984417e6d7dd483f6 /core/variant/array.h | |
parent | a7a51fb3261d4d239dcce3070cbdbdb8e3abdcdb (diff) | |
parent | fb83d905daed6c2a7c4f95712d47815c7ccd8f2e (diff) |
Merge pull request #45698 from KoBeWi/callables_are_love_callables_are_life
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; |