mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Array::insert consistent with Pool*Array::insert
This commit is contained in:
@@ -202,9 +202,9 @@ Error Array::resize(int p_new_size) {
|
|||||||
return _p->array.resize(p_new_size);
|
return _p->array.resize(p_new_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Array::insert(int p_pos, const Variant &p_value) {
|
Error Array::insert(int p_pos, const Variant &p_value) {
|
||||||
ERR_FAIL_COND(!_p->typed.validate(p_value, "insert"));
|
ERR_FAIL_COND_V(!_p->typed.validate(p_value, "insert"), ERR_INVALID_PARAMETER);
|
||||||
_p->array.insert(p_pos, p_value);
|
return _p->array.insert(p_pos, p_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Array::erase(const Variant &p_value) {
|
void Array::erase(const Variant &p_value) {
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ public:
|
|||||||
void append_array(const Array &p_array);
|
void append_array(const Array &p_array);
|
||||||
Error resize(int p_new_size);
|
Error resize(int p_new_size);
|
||||||
|
|
||||||
void insert(int p_pos, const Variant &p_value);
|
Error insert(int p_pos, const Variant &p_value);
|
||||||
void remove(int p_pos);
|
void remove(int p_pos);
|
||||||
|
|
||||||
Variant front() const;
|
Variant front() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user