From 67cdac6db82c33f30601a50e1da9d86b6c163426 Mon Sep 17 00:00:00 2001 From: Micky Date: Fri, 25 Nov 2022 14:48:48 +0100 Subject: Remove `Array.find_last()` --- core/variant/array.cpp | 5 ----- core/variant/array.h | 1 - core/variant/variant_call.cpp | 1 - 3 files changed, 7 deletions(-) (limited to 'core/variant') 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()); -- cgit v1.2.3