Merge pull request #485 from colugomusic/fix-array-const
Fix constness of Array::find, Array::find_last and Array::rfindpull/500/head
commit
05ba977cc6
|
@ -104,9 +104,9 @@ public:
|
||||||
|
|
||||||
Variant back() const;
|
Variant back() const;
|
||||||
|
|
||||||
int find(const Variant &what, const int from = 0);
|
int find(const Variant &what, const int from = 0) const;
|
||||||
|
|
||||||
int find_last(const Variant &what);
|
int find_last(const Variant &what) const;
|
||||||
|
|
||||||
bool has(const Variant &what) const;
|
bool has(const Variant &what) const;
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@ public:
|
||||||
|
|
||||||
void resize(const int size);
|
void resize(const int size);
|
||||||
|
|
||||||
int rfind(const Variant &what, const int from = -1);
|
int rfind(const Variant &what, const int from = -1) const;
|
||||||
|
|
||||||
void sort();
|
void sort();
|
||||||
|
|
||||||
|
|
|
@ -92,11 +92,11 @@ Variant Array::back() const {
|
||||||
return *(Variant *)&v;
|
return *(Variant *)&v;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Array::find(const Variant &what, const int from) {
|
int Array::find(const Variant &what, const int from) const {
|
||||||
return godot::api->godot_array_find(&_godot_array, (godot_variant *)&what, from);
|
return godot::api->godot_array_find(&_godot_array, (godot_variant *)&what, from);
|
||||||
}
|
}
|
||||||
|
|
||||||
int Array::find_last(const Variant &what) {
|
int Array::find_last(const Variant &what) const {
|
||||||
return godot::api->godot_array_find_last(&_godot_array, (godot_variant *)&what);
|
return godot::api->godot_array_find_last(&_godot_array, (godot_variant *)&what);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ void Array::resize(const int size) {
|
||||||
godot::api->godot_array_resize(&_godot_array, size);
|
godot::api->godot_array_resize(&_godot_array, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
int Array::rfind(const Variant &what, const int from) {
|
int Array::rfind(const Variant &what, const int from) const {
|
||||||
return godot::api->godot_array_rfind(&_godot_array, (godot_variant *)&what, from);
|
return godot::api->godot_array_rfind(&_godot_array, (godot_variant *)&what, from);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue