From 479d206c5004a6b486c77f93f3bbeeca8c93232f Mon Sep 17 00:00:00 2001 From: Ben Lubar Date: Wed, 19 Feb 2025 13:44:29 -0600 Subject: [PATCH] make Vector::bsearch use a const receiver --- include/godot_cpp/templates/vector.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/godot_cpp/templates/vector.hpp b/include/godot_cpp/templates/vector.hpp index aaa84f338..b25d0ff4f 100644 --- a/include/godot_cpp/templates/vector.hpp +++ b/include/godot_cpp/templates/vector.hpp @@ -122,14 +122,14 @@ class Vector { sorter.sort(data, len); } - Size bsearch(const T &p_value, bool p_before) { + Size bsearch(const T &p_value, bool p_before) const { return bsearch_custom<_DefaultComparator>(p_value, p_before); } template - Size bsearch_custom(const Value &p_value, bool p_before, Args &&...args) { + Size bsearch_custom(const Value &p_value, bool p_before, Args &&...args) const { SearchArray search{ args... }; - return search.bisect(ptrw(), size(), p_value, p_before); + return search.bisect(ptr(), size(), p_value, p_before); } Vector duplicate() {