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() {