Skip to content
Closed
Show file tree
Hide file tree
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 core/templates/vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,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
2 changes: 1 addition & 1 deletion doc/classes/PackedByteArray.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
Appends a [PackedByteArray] at the end of this array.
</description>
</method>
<method name="bsearch">
<method name="bsearch" qualifiers="const">
<return type="int" />
<param index="0" name="value" type="int" />
<param index="1" name="before" type="bool" default="true" />
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/PackedColorArray.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
Appends a [PackedColorArray] at the end of this array.
</description>
</method>
<method name="bsearch">
<method name="bsearch" qualifiers="const">
<return type="int" />
<param index="0" name="value" type="Color" />
<param index="1" name="before" type="bool" default="true" />
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/PackedFloat32Array.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
Appends a [PackedFloat32Array] at the end of this array.
</description>
</method>
<method name="bsearch">
<method name="bsearch" qualifiers="const">
<return type="int" />
<param index="0" name="value" type="float" />
<param index="1" name="before" type="bool" default="true" />
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/PackedFloat64Array.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
Appends a [PackedFloat64Array] at the end of this array.
</description>
</method>
<method name="bsearch">
<method name="bsearch" qualifiers="const">
<return type="int" />
<param index="0" name="value" type="float" />
<param index="1" name="before" type="bool" default="true" />
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/PackedInt32Array.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
Appends a [PackedInt32Array] at the end of this array.
</description>
</method>
<method name="bsearch">
<method name="bsearch" qualifiers="const">
<return type="int" />
<param index="0" name="value" type="int" />
<param index="1" name="before" type="bool" default="true" />
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/PackedInt64Array.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
Appends a [PackedInt64Array] at the end of this array.
</description>
</method>
<method name="bsearch">
<method name="bsearch" qualifiers="const">
<return type="int" />
<param index="0" name="value" type="int" />
<param index="1" name="before" type="bool" default="true" />
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/PackedStringArray.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
Appends a [PackedStringArray] at the end of this array.
</description>
</method>
<method name="bsearch">
<method name="bsearch" qualifiers="const">
<return type="int" />
<param index="0" name="value" type="String" />
<param index="1" name="before" type="bool" default="true" />
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/PackedVector2Array.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
Appends a [PackedVector2Array] at the end of this array.
</description>
</method>
<method name="bsearch">
<method name="bsearch" qualifiers="const">
<return type="int" />
<param index="0" name="value" type="Vector2" />
<param index="1" name="before" type="bool" default="true" />
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/PackedVector3Array.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
Appends a [PackedVector3Array] at the end of this array.
</description>
</method>
<method name="bsearch">
<method name="bsearch" qualifiers="const">
<return type="int" />
<param index="0" name="value" type="Vector3" />
<param index="1" name="before" type="bool" default="true" />
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/PackedVector4Array.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
Appends a [PackedVector4Array] at the end of this array.
</description>
</method>
<method name="bsearch">
<method name="bsearch" qualifiers="const">
<return type="int" />
<param index="0" name="value" type="Vector4" />
<param index="1" name="before" type="bool" default="true" />
Expand Down