summaryrefslogtreecommitdiff
path: root/core/variant
diff options
context:
space:
mode:
authorMicky <micheledevita2@gmail.com>2022-11-25 14:48:48 +0100
committerMicky <micheledevita2@gmail.com>2022-11-25 18:34:50 +0100
commit67cdac6db82c33f30601a50e1da9d86b6c163426 (patch)
treedc7ed611f6c3e6ee75ca9844013d1086f2974337 /core/variant
parenta9fbf3718d4f8455dee1ebad05374d7baf714370 (diff)
Remove `Array.find_last()`
Diffstat (limited to 'core/variant')
-rw-r--r--core/variant/array.cpp5
-rw-r--r--core/variant/array.h1
-rw-r--r--core/variant/variant_call.cpp1
3 files changed, 0 insertions, 7 deletions
diff --git a/core/variant/array.cpp b/core/variant/array.cpp
index c6bbd43dc4..6c4e8ba450 100644
--- a/core/variant/array.cpp
+++ b/core/variant/array.cpp
@@ -334,11 +334,6 @@ int Array::rfind(const Variant &p_value, int p_from) const {
return -1;
}
-int Array::find_last(const Variant &p_value) const {
- ERR_FAIL_COND_V(!_p->typed.validate(p_value, "find_last"), -1);
- return rfind(p_value);
-}
-
int Array::count(const Variant &p_value) const {
ERR_FAIL_COND_V(!_p->typed.validate(p_value, "count"), 0);
if (_p->array.size() == 0) {
diff --git a/core/variant/array.h b/core/variant/array.h
index ee265a9ffd..2dd3dde2d1 100644
--- a/core/variant/array.h
+++ b/core/variant/array.h
@@ -90,7 +90,6 @@ public:
int find(const Variant &p_value, int p_from = 0) const;
int rfind(const Variant &p_value, int p_from = -1) const;
- int find_last(const Variant &p_value) const;
int count(const Variant &p_value) const;
bool has(const Variant &p_value) const;
diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp
index 1e80e2681d..2cb80dcab4 100644
--- a/core/variant/variant_call.cpp
+++ b/core/variant/variant_call.cpp
@@ -2058,7 +2058,6 @@ static void _register_variant_builtin_methods() {
bind_method(Array, pick_random, sarray(), varray());
bind_method(Array, find, sarray("what", "from"), varray(0));
bind_method(Array, rfind, sarray("what", "from"), varray(-1));
- bind_method(Array, find_last, sarray("value"), varray());
bind_method(Array, count, sarray("value"), varray());
bind_method(Array, has, sarray("value"), varray());
bind_method(Array, pop_back, sarray(), varray());