From 505076c9a97adb72386ce352610048ea93040167 Mon Sep 17 00:00:00 2001 From: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Date: Mon, 6 May 2024 17:47:21 +0200 Subject: [PATCH] [Core] Add `LocalVector::has` for convenience --- include/godot_cpp/templates/local_vector.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/godot_cpp/templates/local_vector.hpp b/include/godot_cpp/templates/local_vector.hpp index 5dad32e0..10af2a90 100644 --- a/include/godot_cpp/templates/local_vector.hpp +++ b/include/godot_cpp/templates/local_vector.hpp @@ -257,6 +257,10 @@ public: return -1; } + bool has(const T &p_val) const { + return find(p_val) != -1; + } + template void sort_custom() { U len = count;