Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions include/godot_cpp/templates/vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<T>>(p_value, p_before);
}

template <typename Comparator, typename Value, typename... Args>
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<T, Comparator> search{ args... };
return search.bisect(ptrw(), size(), p_value, p_before);
return search.bisect(ptr(), size(), p_value, p_before);
}

Vector<T> duplicate() {
Expand Down