You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Rename remove() to remove_at() when removing by index
This commit is contained in:
committed by
Aaron Record
parent
5efe80f308
commit
e078f970db
@@ -322,8 +322,8 @@ bool Array::has(const Variant &p_value) const {
|
||||
return _p->array.find(p_value, 0) != -1;
|
||||
}
|
||||
|
||||
void Array::remove(int p_pos) {
|
||||
_p->array.remove(p_pos);
|
||||
void Array::remove_at(int p_pos) {
|
||||
_p->array.remove_at(p_pos);
|
||||
}
|
||||
|
||||
void Array::set(int p_idx, const Variant &p_value) {
|
||||
@@ -576,7 +576,7 @@ Variant Array::pop_back() {
|
||||
Variant Array::pop_front() {
|
||||
if (!_p->array.is_empty()) {
|
||||
const Variant ret = _p->array.get(0);
|
||||
_p->array.remove(0);
|
||||
_p->array.remove_at(0);
|
||||
return ret;
|
||||
}
|
||||
return Variant();
|
||||
@@ -603,7 +603,7 @@ Variant Array::pop_at(int p_pos) {
|
||||
_p->array.size()));
|
||||
|
||||
const Variant ret = _p->array.get(p_pos);
|
||||
_p->array.remove(p_pos);
|
||||
_p->array.remove_at(p_pos);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user