Add bsearch and bsearch_custom to Array
This commit is contained in:
@ -302,6 +302,17 @@ void GDAPI godot_array_sort_custom(godot_array *p_self, godot_object *p_obj, con
|
||||
self->sort_custom((Object *)p_obj, *func);
|
||||
}
|
||||
|
||||
godot_int GDAPI godot_array_bsearch(godot_array *p_self, const godot_variant *p_value, const godot_bool p_before) {
|
||||
Array *self = (Array *)p_self;
|
||||
return self->bsearch((const Variant *)p_value, p_before);
|
||||
}
|
||||
|
||||
godot_int GDAPI godot_array_bsearch_custom(godot_array *p_self, const godot_variant *p_value, godot_object *p_obj, const godot_string *p_func, const godot_bool p_before) {
|
||||
Array *self = (Array *)p_self;
|
||||
const String *func = (const String *)p_func;
|
||||
return self->bsearch_custom((const Variant *)p_value, (Object *)p_obj, *func, p_before);
|
||||
}
|
||||
|
||||
void GDAPI godot_array_destroy(godot_array *p_self) {
|
||||
((Array *)p_self)->~Array();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user