Skip to content

Commit d1dcd5f

Browse files
committed
make Vector<T>::bsearch use a const receiver
1 parent 5eb6e6b commit d1dcd5f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/godot_cpp/templates/vector.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,12 @@ class Vector {
122122
sorter.sort(data, len);
123123
}
124124

125-
Size bsearch(const T &p_value, bool p_before) {
125+
Size bsearch(const T &p_value, bool p_before) const {
126126
return bsearch_custom<_DefaultComparator<T>>(p_value, p_before);
127127
}
128128

129129
template <typename Comparator, typename Value, typename... Args>
130-
Size bsearch_custom(const Value &p_value, bool p_before, Args &&...args) {
130+
Size bsearch_custom(const Value &p_value, bool p_before, Args &&...args) const {
131131
SearchArray<T, Comparator> search{ args... };
132132
return search.bisect(ptrw(), size(), p_value, p_before);
133133
}

0 commit comments

Comments
 (0)