summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLightning_A <aaronjrecord@gmail.com>2021-07-03 16:17:03 -0600
committerAaron Record <aaronjrecord@gmail.com>2021-11-23 18:58:57 -0700
commite078f970db0e72bcc665d714416e6fc74e8434a6 (patch)
tree21fb39b40de2674a99018d88e142e6f0196c68b0
parent5efe80f3085c8c6451363fe4c743bf3d7fc20b6c (diff)
Rename `remove()` to `remove_at()` when removing by index
-rw-r--r--core/input/input.cpp2
-rw-r--r--core/math/a_star.cpp4
-rw-r--r--core/math/bvh.h2
-rw-r--r--core/math/bvh_pair.inc2
-rw-r--r--core/math/convex_hull.cpp2
-rw-r--r--core/math/delaunay_2d.h4
-rw-r--r--core/math/expression.cpp6
-rw-r--r--core/object/undo_redo.cpp2
-rw-r--r--core/string/node_path.cpp6
-rw-r--r--core/string/ustring.cpp8
-rw-r--r--core/string/ustring.h2
-rw-r--r--core/templates/bin_sorted_array.h2
-rw-r--r--core/templates/cowdata.h2
-rw-r--r--core/templates/local_vector.h6
-rw-r--r--core/templates/vector.h4
-rw-r--r--core/templates/vmap.h2
-rw-r--r--core/templates/vset.h2
-rw-r--r--core/variant/array.cpp8
-rw-r--r--core/variant/array.h2
-rw-r--r--core/variant/variant_call.cpp20
-rw-r--r--core/variant/variant_setget.cpp6
-rw-r--r--doc/classes/Array.xml4
-rw-r--r--doc/classes/PackedByteArray.xml2
-rw-r--r--doc/classes/PackedColorArray.xml2
-rw-r--r--doc/classes/PackedFloat32Array.xml2
-rw-r--r--doc/classes/PackedFloat64Array.xml2
-rw-r--r--doc/classes/PackedInt32Array.xml2
-rw-r--r--doc/classes/PackedInt64Array.xml2
-rw-r--r--doc/classes/PackedStringArray.xml2
-rw-r--r--doc/classes/PackedVector2Array.xml2
-rw-r--r--doc/classes/PackedVector3Array.xml2
-rw-r--r--editor/action_map_editor.cpp2
-rw-r--r--editor/connections_dialog.cpp4
-rw-r--r--editor/create_dialog.cpp2
-rw-r--r--editor/editor_data.cpp8
-rw-r--r--editor/editor_export.cpp2
-rw-r--r--editor/editor_file_dialog.cpp4
-rw-r--r--editor/editor_file_system.cpp4
-rw-r--r--editor/editor_inspector.cpp4
-rw-r--r--editor/editor_node.cpp8
-rw-r--r--editor/editor_properties_array_dict.cpp2
-rw-r--r--editor/editor_run.cpp2
-rw-r--r--editor/filesystem_dock.cpp10
-rw-r--r--editor/import/collada.cpp8
-rw-r--r--editor/localization_editor.cpp8
-rw-r--r--editor/plugins/abstract_polygon_2d_editor.cpp4
-rw-r--r--editor/plugins/animation_blend_tree_editor_plugin.cpp2
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp6
-rw-r--r--editor/plugins/collision_polygon_3d_editor_plugin.cpp2
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp2
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.cpp10
-rw-r--r--editor/plugins/script_editor_plugin.cpp4
-rw-r--r--editor/plugins/tiles/tile_data_editors.cpp6
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp2
-rw-r--r--editor/project_manager.cpp4
-rw-r--r--editor/settings_config_dialog.cpp4
-rw-r--r--modules/bullet/area_bullet.cpp4
-rw-r--r--modules/bullet/collision_object_bullet.cpp4
-rw-r--r--modules/bullet/soft_body_bullet.cpp2
-rw-r--r--modules/csg/csg.cpp16
-rw-r--r--modules/gdscript/gdscript.cpp4
-rw-r--r--modules/gdscript/gdscript_parser.cpp4
-rw-r--r--modules/gdscript/language_server/gdscript_language_protocol.cpp2
-rw-r--r--modules/mono/glue/collections_glue.cpp4
-rw-r--r--modules/navigation/godot_navigation_server.cpp8
-rw-r--r--modules/text_server_adv/text_server_adv.cpp2
-rw-r--r--modules/text_server_fb/text_server_fb.cpp2
-rw-r--r--modules/upnp/upnp.cpp2
-rw-r--r--modules/visual_script/visual_script.cpp2
-rw-r--r--modules/visual_script/visual_script_expression.cpp6
-rw-r--r--modules/visual_script/visual_script_nodes.cpp6
-rw-r--r--platform/android/android_input_handler.cpp2
-rw-r--r--platform/android/export/export_plugin.cpp2
-rw-r--r--platform/linuxbsd/display_server_x11.cpp2
-rw-r--r--platform/linuxbsd/joypad_linux.cpp2
-rw-r--r--platform/osx/gl_manager_osx.mm2
-rw-r--r--platform/osx/joypad_osx.cpp2
-rw-r--r--platform/uwp/export/export_plugin.cpp2
-rw-r--r--platform/windows/gl_manager_windows.cpp4
-rw-r--r--scene/2d/audio_stream_player_2d.cpp2
-rw-r--r--scene/2d/collision_object_2d.cpp2
-rw-r--r--scene/2d/line_2d.cpp2
-rw-r--r--scene/2d/navigation_region_2d.cpp2
-rw-r--r--scene/2d/polygon_2d.cpp2
-rw-r--r--scene/2d/skeleton_2d.cpp2
-rw-r--r--scene/2d/tile_map.cpp4
-rw-r--r--scene/3d/audio_stream_player_3d.cpp2
-rw-r--r--scene/3d/collision_object_3d.cpp2
-rw-r--r--scene/3d/node_3d.cpp2
-rw-r--r--scene/3d/skeleton_3d.cpp2
-rw-r--r--scene/3d/soft_dynamic_body_3d.cpp2
-rw-r--r--scene/animation/animation_blend_space_2d.cpp4
-rw-r--r--scene/animation/animation_node_state_machine.cpp8
-rw-r--r--scene/animation/animation_tree.cpp2
-rw-r--r--scene/audio/audio_stream_player.cpp2
-rw-r--r--scene/gui/code_edit.cpp6
-rw-r--r--scene/gui/gradient_edit.cpp4
-rw-r--r--scene/gui/item_list.cpp4
-rw-r--r--scene/gui/popup_menu.cpp2
-rw-r--r--scene/gui/rich_text_label.cpp6
-rw-r--r--scene/gui/tab_bar.cpp4
-rw-r--r--scene/gui/text_edit.cpp14
-rw-r--r--scene/gui/text_edit.h2
-rw-r--r--scene/gui/tree.cpp2
-rw-r--r--scene/gui/tree.h2
-rw-r--r--scene/main/node.cpp4
-rw-r--r--scene/main/viewport.cpp6
-rw-r--r--scene/resources/animation.cpp48
-rw-r--r--scene/resources/curve.cpp8
-rw-r--r--scene/resources/font.cpp6
-rw-r--r--scene/resources/gradient.cpp2
-rw-r--r--scene/resources/packed_scene.cpp2
-rw-r--r--scene/resources/skeleton_modification_stack_2d.cpp2
-rw-r--r--scene/resources/skeleton_modification_stack_3d.cpp4
-rw-r--r--scene/resources/sprite_frames.cpp2
-rw-r--r--scene/resources/syntax_highlighter.cpp2
-rw-r--r--scene/resources/tile_set.cpp44
-rw-r--r--scene/resources/visual_shader.cpp2
-rw-r--r--servers/audio_server.cpp6
-rw-r--r--servers/camera_server.cpp2
-rw-r--r--servers/physics_2d/godot_body_2d.h2
-rw-r--r--servers/physics_2d/godot_collision_object_2d.cpp2
-rw-r--r--servers/physics_3d/godot_body_3d.h2
-rw-r--r--servers/physics_3d/godot_collision_object_3d.cpp2
-rw-r--r--servers/physics_3d/godot_soft_body_3d.cpp2
-rw-r--r--servers/physics_3d/godot_soft_body_3d.h2
-rw-r--r--servers/rendering/renderer_canvas_cull.h2
-rw-r--r--servers/rendering/renderer_scene_cull.cpp2
-rw-r--r--servers/rendering/shader_language.cpp8
-rw-r--r--servers/text_server.cpp6
-rw-r--r--servers/xr_server.cpp4
-rw-r--r--tests/core/templates/test_local_vector.h24
-rw-r--r--tests/core/templates/test_vector.h34
-rw-r--r--tests/core/variant/test_array.h10
134 files changed, 323 insertions, 323 deletions
diff --git a/core/input/input.cpp b/core/input/input.cpp
index d0144ca47f..342ab3b704 100644
--- a/core/input/input.cpp
+++ b/core/input/input.cpp
@@ -1351,7 +1351,7 @@ void Input::add_joy_mapping(String p_mapping, bool p_update_existing) {
void Input::remove_joy_mapping(String p_guid) {
for (int i = map_db.size() - 1; i >= 0; i--) {
if (p_guid == map_db[i].uid) {
- map_db.remove(i);
+ map_db.remove_at(i);
}
}
for (KeyValue<int, Joypad> &E : joy_names) {
diff --git a/core/math/a_star.cpp b/core/math/a_star.cpp
index 1079da75ef..8a44646ef9 100644
--- a/core/math/a_star.cpp
+++ b/core/math/a_star.cpp
@@ -344,7 +344,7 @@ bool AStar::_solve(Point *begin_point, Point *end_point) {
}
sorter.pop_heap(0, open_list.size(), open_list.ptrw()); // Remove the current point from the open list
- open_list.remove(open_list.size() - 1);
+ open_list.remove_at(open_list.size() - 1);
p->closed_pass = pass; // Mark the point as closed
for (OAHashMap<int, Point *>::Iterator it = p->neighbours.iter(); it.valid; it = p->neighbours.next_iter(it)) {
@@ -812,7 +812,7 @@ bool AStar2D::_solve(AStar::Point *begin_point, AStar::Point *end_point) {
}
sorter.pop_heap(0, open_list.size(), open_list.ptrw()); // Remove the current point from the open list
- open_list.remove(open_list.size() - 1);
+ open_list.remove_at(open_list.size() - 1);
p->closed_pass = astar.pass; // Mark the point as closed
for (OAHashMap<int, AStar::Point *>::Iterator it = p->neighbours.iter(); it.valid; it = p->neighbours.next_iter(it)) {
diff --git a/core/math/bvh.h b/core/math/bvh.h
index 65b8b102a3..c1eff02178 100644
--- a/core/math/bvh.h
+++ b/core/math/bvh.h
@@ -654,7 +654,7 @@ private:
// remove from changed items (not very efficient yet)
for (int n = 0; n < (int)changed_items.size(); n++) {
if (changed_items[n] == p_handle) {
- changed_items.remove_unordered(n);
+ changed_items.remove_at_unordered(n);
// because we are using an unordered remove,
// the last changed item will now be at spot 'n',
diff --git a/core/math/bvh_pair.inc b/core/math/bvh_pair.inc
index 839db59a3a..a12acec2b6 100644
--- a/core/math/bvh_pair.inc
+++ b/core/math/bvh_pair.inc
@@ -51,7 +51,7 @@ struct ItemPairs {
for (int n = 0; n < num_pairs; n++) {
if (extended_pairs[n].handle == h) {
userdata = extended_pairs[n].userdata;
- extended_pairs.remove_unordered(n);
+ extended_pairs.remove_at_unordered(n);
num_pairs--;
break;
}
diff --git a/core/math/convex_hull.cpp b/core/math/convex_hull.cpp
index f6560f1bea..2956e0cf09 100644
--- a/core/math/convex_hull.cpp
+++ b/core/math/convex_hull.cpp
@@ -1688,7 +1688,7 @@ real_t ConvexHullInternal::shrink(real_t p_amount, real_t p_clamp_amount) {
while (stack.size() > 0) {
Vertex *v = stack[stack.size() - 1];
- stack.remove(stack.size() - 1);
+ stack.remove_at(stack.size() - 1);
Edge *e = v->edges;
if (e) {
do {
diff --git a/core/math/delaunay_2d.h b/core/math/delaunay_2d.h
index 2f80cb5634..779ac96b79 100644
--- a/core/math/delaunay_2d.h
+++ b/core/math/delaunay_2d.h
@@ -123,7 +123,7 @@ public:
for (int j = 0; j < triangles.size(); j++) {
if (triangles[j].bad) {
- triangles.remove(j);
+ triangles.remove_at(j);
j--;
}
}
@@ -154,7 +154,7 @@ public:
}
}
if (invalid) {
- triangles.remove(i);
+ triangles.remove_at(i);
i--;
}
}
diff --git a/core/math/expression.cpp b/core/math/expression.cpp
index 05f2c8dac9..f366fd0499 100644
--- a/core/math/expression.cpp
+++ b/core/math/expression.cpp
@@ -1087,7 +1087,7 @@ Expression::ENode *Expression::_parse_expression() {
op->nodes[1] = nullptr;
expression.write[i].is_op = false;
expression.write[i].node = op;
- expression.remove(i + 1);
+ expression.remove_at(i + 1);
}
} else {
@@ -1119,8 +1119,8 @@ Expression::ENode *Expression::_parse_expression() {
//replace all 3 nodes by this operator and make it an expression
expression.write[next_op - 1].node = op;
- expression.remove(next_op);
- expression.remove(next_op);
+ expression.remove_at(next_op);
+ expression.remove_at(next_op);
}
}
diff --git a/core/object/undo_redo.cpp b/core/object/undo_redo.cpp
index 07006e7968..3459506860 100644
--- a/core/object/undo_redo.cpp
+++ b/core/object/undo_redo.cpp
@@ -282,7 +282,7 @@ void UndoRedo::_pop_history_tail() {
}
}
- actions.remove(0);
+ actions.remove_at(0);
if (current_action >= 0) {
current_action--;
}
diff --git a/core/string/node_path.cpp b/core/string/node_path.cpp
index 5fae13779e..7ab85ac9d0 100644
--- a/core/string/node_path.cpp
+++ b/core/string/node_path.cpp
@@ -293,12 +293,12 @@ void NodePath::simplify() {
break;
}
if (data->path[i].operator String() == ".") {
- data->path.remove(i);
+ data->path.remove_at(i);
i--;
} else if (i > 0 && data->path[i].operator String() == ".." && data->path[i - 1].operator String() != "." && data->path[i - 1].operator String() != "..") {
//remove both
- data->path.remove(i - 1);
- data->path.remove(i - 1);
+ data->path.remove_at(i - 1);
+ data->path.remove_at(i - 1);
i -= 2;
if (data->path.size() == 0) {
data->path.push_back(".");
diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp
index 70236231a2..320aae2ba4 100644
--- a/core/string/ustring.cpp
+++ b/core/string/ustring.cpp
@@ -3670,15 +3670,15 @@ String String::simplify_path() const {
for (int i = 0; i < dirs.size(); i++) {
String d = dirs[i];
if (d == ".") {
- dirs.remove(i);
+ dirs.remove_at(i);
i--;
} else if (d == "..") {
if (i == 0) {
- dirs.remove(i);
+ dirs.remove_at(i);
i--;
} else {
- dirs.remove(i);
- dirs.remove(i - 1);
+ dirs.remove_at(i);
+ dirs.remove_at(i - 1);
i -= 2;
}
}
diff --git a/core/string/ustring.h b/core/string/ustring.h
index 1d80ccf58d..f25c36f66c 100644
--- a/core/string/ustring.h
+++ b/core/string/ustring.h
@@ -209,7 +209,7 @@ public:
_FORCE_INLINE_ char32_t *ptrw() { return _cowdata.ptrw(); }
_FORCE_INLINE_ const char32_t *ptr() const { return _cowdata.ptr(); }
- void remove(int p_index) { _cowdata.remove(p_index); }
+ void remove_at(int p_index) { _cowdata.remove_at(p_index); }
_FORCE_INLINE_ void clear() { resize(0); }
diff --git a/core/templates/bin_sorted_array.h b/core/templates/bin_sorted_array.h
index be9d0b5475..8db3e7aeb8 100644
--- a/core/templates/bin_sorted_array.h
+++ b/core/templates/bin_sorted_array.h
@@ -112,7 +112,7 @@ public:
return current_idx;
}
- void remove(uint64_t p_idx) {
+ void remove_at(uint64_t p_idx) {
ERR_FAIL_COND(p_idx >= array.size());
uint64_t new_idx = move(p_idx, 0);
uint64_t swap_idx = array.size() - 1;
diff --git a/core/templates/cowdata.h b/core/templates/cowdata.h
index 9b8c0eb528..e79ca037db 100644
--- a/core/templates/cowdata.h
+++ b/core/templates/cowdata.h
@@ -167,7 +167,7 @@ public:
Error resize(int p_size);
- _FORCE_INLINE_ void remove(int p_index) {
+ _FORCE_INLINE_ void remove_at(int p_index) {
ERR_FAIL_INDEX(p_index, size());
T *p = ptrw();
int len = size();
diff --git a/core/templates/local_vector.h b/core/templates/local_vector.h
index 5704b8f230..3854e1e94c 100644
--- a/core/templates/local_vector.h
+++ b/core/templates/local_vector.h
@@ -70,7 +70,7 @@ public:
}
}
- void remove(U p_index) {
+ void remove_at(U p_index) {
ERR_FAIL_UNSIGNED_INDEX(p_index, count);
count--;
for (U i = p_index; i < count; i++) {
@@ -83,7 +83,7 @@ public:
/// Removes the item copying the last value into the position of the one to
/// remove. It's generally faster than `remove`.
- void remove_unordered(U p_index) {
+ void remove_at_unordered(U p_index) {
ERR_FAIL_INDEX(p_index, count);
count--;
if (count > p_index) {
@@ -97,7 +97,7 @@ public:
void erase(const T &p_val) {
int64_t idx = find(p_val);
if (idx >= 0) {
- remove(idx);
+ remove_at(idx);
}
}
diff --git a/core/templates/vector.h b/core/templates/vector.h
index 98982c80d3..a955d49101 100644
--- a/core/templates/vector.h
+++ b/core/templates/vector.h
@@ -68,11 +68,11 @@ public:
_FORCE_INLINE_ bool append(const T &p_elem) { return push_back(p_elem); } //alias
void fill(T p_elem);
- void remove(int p_index) { _cowdata.remove(p_index); }
+ void remove_at(int p_index) { _cowdata.remove_at(p_index); }
void erase(const T &p_val) {
int idx = find(p_val);
if (idx >= 0) {
- remove(idx);
+ remove_at(idx);
}
}
void reverse();
diff --git a/core/templates/vmap.h b/core/templates/vmap.h
index 520e0b3720..2aa22f97cf 100644
--- a/core/templates/vmap.h
+++ b/core/templates/vmap.h
@@ -134,7 +134,7 @@ public:
if (pos < 0) {
return;
}
- _cowdata.remove(pos);
+ _cowdata.remove_at(pos);
}
int find(const T &p_val) const {
diff --git a/core/templates/vset.h b/core/templates/vset.h
index 6665651d42..94e7a17061 100644
--- a/core/templates/vset.h
+++ b/core/templates/vset.h
@@ -119,7 +119,7 @@ public:
if (pos < 0) {
return;
}
- _data.remove(pos);
+ _data.remove_at(pos);
}
int find(const T &p_val) const {
diff --git a/core/variant/array.cpp b/core/variant/array.cpp
index 69a0fff1a1..b049c29688 100644
--- a/core/variant/array.cpp
+++ b/core/variant/array.cpp
@@ -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;
}
diff --git a/core/variant/array.h b/core/variant/array.h
index bd39b8e0b1..5d2839dda7 100644
--- a/core/variant/array.h
+++ b/core/variant/array.h
@@ -75,7 +75,7 @@ public:
Error resize(int p_new_size);
Error insert(int p_pos, const Variant &p_value);
- void remove(int p_pos);
+ void remove_at(int p_pos);
void fill(const Variant &p_value);
Variant front() const;
diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp
index 65ea969146..34b8b782d2 100644
--- a/core/variant/variant_call.cpp
+++ b/core/variant/variant_call.cpp
@@ -1808,7 +1808,7 @@ static void _register_variant_builtin_methods() {
bind_method(Array, append_array, sarray("array"), varray());
bind_method(Array, resize, sarray("size"), varray());
bind_method(Array, insert, sarray("position", "value"), varray());
- bind_method(Array, remove, sarray("position"), varray());
+ bind_method(Array, remove_at, sarray("position"), varray());
bind_method(Array, fill, sarray("value"), varray());
bind_method(Array, erase, sarray("value"), varray());
bind_method(Array, front, sarray(), varray());
@@ -1842,7 +1842,7 @@ static void _register_variant_builtin_methods() {
bind_method(PackedByteArray, push_back, sarray("value"), varray());
bind_method(PackedByteArray, append, sarray("value"), varray());
bind_method(PackedByteArray, append_array, sarray("array"), varray());
- bind_method(PackedByteArray, remove, sarray("index"), varray());
+ bind_method(PackedByteArray, remove_at, sarray("index"), varray());
bind_method(PackedByteArray, insert, sarray("at_index", "value"), varray());
bind_method(PackedByteArray, fill, sarray("value"), varray());
bind_method(PackedByteArray, resize, sarray("new_size"), varray());
@@ -1903,7 +1903,7 @@ static void _register_variant_builtin_methods() {
bind_method(PackedInt32Array, push_back, sarray("value"), varray());
bind_method(PackedInt32Array, append, sarray("value"), varray());
bind_method(PackedInt32Array, append_array, sarray("array"), varray());
- bind_method(PackedInt32Array, remove, sarray("index"), varray());
+ bind_method(PackedInt32Array, remove_at, sarray("index"), varray());
bind_method(PackedInt32Array, insert, sarray("at_index", "value"), varray());
bind_method(PackedInt32Array, fill, sarray("value"), varray());
bind_method(PackedInt32Array, resize, sarray("new_size"), varray());
@@ -1923,7 +1923,7 @@ static void _register_variant_builtin_methods() {
bind_method(PackedInt64Array, push_back, sarray("value"), varray());
bind_method(PackedInt64Array, append, sarray("value"), varray());
bind_method(PackedInt64Array, append_array, sarray("array"), varray());
- bind_method(PackedInt64Array, remove, sarray("index"), varray());
+ bind_method(PackedInt64Array, remove_at, sarray("index"), varray());
bind_method(PackedInt64Array, insert, sarray("at_index", "value"), varray());
bind_method(PackedInt64Array, fill, sarray("value"), varray());
bind_method(PackedInt64Array, resize, sarray("new_size"), varray());
@@ -1943,7 +1943,7 @@ static void _register_variant_builtin_methods() {
bind_method(PackedFloat32Array, push_back, sarray("value"), varray());
bind_method(PackedFloat32Array, append, sarray("value"), varray());
bind_method(PackedFloat32Array, append_array, sarray("array"), varray());
- bind_method(PackedFloat32Array, remove, sarray("index"), varray());
+ bind_method(PackedFloat32Array, remove_at, sarray("index"), varray());
bind_method(PackedFloat32Array, insert, sarray("at_index", "value"), varray());
bind_method(PackedFloat32Array, fill, sarray("value"), varray());
bind_method(PackedFloat32Array, resize, sarray("new_size"), varray());
@@ -1963,7 +1963,7 @@ static void _register_variant_builtin_methods() {
bind_method(PackedFloat64Array, push_back, sarray("value"), varray());
bind_method(PackedFloat64Array, append, sarray("value"), varray());
bind_method(PackedFloat64Array, append_array, sarray("array"), varray());
- bind_method(PackedFloat64Array, remove, sarray("index"), varray());
+ bind_method(PackedFloat64Array, remove_at, sarray("index"), varray());
bind_method(PackedFloat64Array, insert, sarray("at_index", "value"), varray());
bind_method(PackedFloat64Array, fill, sarray("value"), varray());
bind_method(PackedFloat64Array, resize, sarray("new_size"), varray());
@@ -1983,7 +1983,7 @@ static void _register_variant_builtin_methods() {
bind_method(PackedStringArray, push_back, sarray("value"), varray());
bind_method(PackedStringArray, append, sarray("value"), varray());
bind_method(PackedStringArray, append_array, sarray("array"), varray());
- bind_method(PackedStringArray, remove, sarray("index"), varray());
+ bind_method(PackedStringArray, remove_at, sarray("index"), varray());
bind_method(PackedStringArray, insert, sarray("at_index", "value"), varray());
bind_method(PackedStringArray, fill, sarray("value"), varray());
bind_method(PackedStringArray, resize, sarray("new_size"), varray());
@@ -2003,7 +2003,7 @@ static void _register_variant_builtin_methods() {
bind_method(PackedVector2Array, push_back, sarray("value"), varray());
bind_method(PackedVector2Array, append, sarray("value"), varray());
bind_method(PackedVector2Array, append_array, sarray("array"), varray());
- bind_method(PackedVector2Array, remove, sarray("index"), varray());
+ bind_method(PackedVector2Array, remove_at, sarray("index"), varray());
bind_method(PackedVector2Array, insert, sarray("at_index", "value"), varray());
bind_method(PackedVector2Array, fill, sarray("value"), varray());
bind_method(PackedVector2Array, resize, sarray("new_size"), varray());
@@ -2023,7 +2023,7 @@ static void _register_variant_builtin_methods() {
bind_method(PackedVector3Array, push_back, sarray("value"), varray());
bind_method(PackedVector3Array, append, sarray("value"), varray());
bind_method(PackedVector3Array, append_array, sarray("array"), varray());
- bind_method(PackedVector3Array, remove, sarray("index"), varray());
+ bind_method(PackedVector3Array, remove_at, sarray("index"), varray());
bind_method(PackedVector3Array, insert, sarray("at_index", "value"), varray());
bind_method(PackedVector3Array, fill, sarray("value"), varray());
bind_method(PackedVector3Array, resize, sarray("new_size"), varray());
@@ -2043,7 +2043,7 @@ static void _register_variant_builtin_methods() {
bind_method(PackedColorArray, push_back, sarray("value"), varray());
bind_method(PackedColorArray, append, sarray("value"), varray());
bind_method(PackedColorArray, append_array, sarray("array"), varray());
- bind_method(PackedColorArray, remove, sarray("index"), varray());
+ bind_method(PackedColorArray, remove_at, sarray("index"), varray());
bind_method(PackedColorArray, insert, sarray("at_index", "value"), varray());
bind_method(PackedColorArray, fill, sarray("value"), varray());
bind_method(PackedColorArray, resize, sarray("new_size"), varray());
diff --git a/core/variant/variant_setget.cpp b/core/variant/variant_setget.cpp
index 2530d77c62..b6ad2d870e 100644
--- a/core/variant/variant_setget.cpp
+++ b/core/variant/variant_setget.cpp
@@ -704,7 +704,7 @@ struct VariantIndexedSetGet_String {
String *b = VariantGetInternalPtr<String>::get_ptr(base);
const String *v = VariantInternal::get_string(value);
if (v->length() == 0) {
- b->remove(index);
+ b->remove_at(index);
} else {
b->set(index, v->get(0));
}
@@ -723,7 +723,7 @@ struct VariantIndexedSetGet_String {
String *b = VariantGetInternalPtr<String>::get_ptr(base);
const String *v = VariantInternal::get_string(value);
if (v->length() == 0) {
- b->remove(index);
+ b->remove_at(index);
} else {
b->set(index, v->get(0));
}
@@ -738,7 +738,7 @@ struct VariantIndexedSetGet_String {
OOB_TEST(index, v.length());
const String &m = *reinterpret_cast<const String *>(member);
if (unlikely(m.length() == 0)) {
- v.remove(index);
+ v.remove_at(index);
} else {
v.set(index, m.unicode_at(0));
}
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index b74d4c1d3d..d505ee98cc 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -194,7 +194,7 @@
<return type="void" />
<argument index="0" name="value" type="Variant" />
<description>
- Removes the first occurrence of a value from the array. To remove an element by index, use [method remove] instead.
+ Removes the first occurrence of a value from the array. To remove an element by index, use [method remove_at] instead.
[b]Note:[/b] This method acts in-place and doesn't return a value.
[b]Note:[/b] On large arrays, this method will be slower if the removed element is close to the beginning of the array (index 0). This is because all elements placed after the removed element have to be reindexed.
</description>
@@ -400,7 +400,7 @@
[/codeblock]
</description>
</method>
- <method name="remove">
+ <method name="remove_at">
<return type="void" />
<argument index="0" name="position" type="int" />
<description>
diff --git a/doc/classes/PackedByteArray.xml b/doc/classes/PackedByteArray.xml
index f951df1eb7..fd098481e4 100644
--- a/doc/classes/PackedByteArray.xml
+++ b/doc/classes/PackedByteArray.xml
@@ -332,7 +332,7 @@
Appends an element at the end of the array.
</description>
</method>
- <method name="remove">
+ <method name="remove_at">
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
diff --git a/doc/classes/PackedColorArray.xml b/doc/classes/PackedColorArray.xml
index 4aa8a19630..f69c5504da 100644
--- a/doc/classes/PackedColorArray.xml
+++ b/doc/classes/PackedColorArray.xml
@@ -95,7 +95,7 @@
Appends a value to the array.
</description>
</method>
- <method name="remove">
+ <method name="remove_at">
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
diff --git a/doc/classes/PackedFloat32Array.xml b/doc/classes/PackedFloat32Array.xml
index 68fb45a62a..ccac607386 100644
--- a/doc/classes/PackedFloat32Array.xml
+++ b/doc/classes/PackedFloat32Array.xml
@@ -96,7 +96,7 @@
Appends an element at the end of the array.
</description>
</method>
- <method name="remove">
+ <method name="remove_at">
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
diff --git a/doc/classes/PackedFloat64Array.xml b/doc/classes/PackedFloat64Array.xml
index 740591a0c0..b164283b3e 100644
--- a/doc/classes/PackedFloat64Array.xml
+++ b/doc/classes/PackedFloat64Array.xml
@@ -96,7 +96,7 @@
Appends an element at the end of the array.
</description>
</method>
- <method name="remove">
+ <method name="remove_at">
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml
index 7a01bb6c7c..c6ff31ebdd 100644
--- a/doc/classes/PackedInt32Array.xml
+++ b/doc/classes/PackedInt32Array.xml
@@ -96,7 +96,7 @@
Appends a value to the array.
</description>
</method>
- <method name="remove">
+ <method name="remove_at">
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
diff --git a/doc/classes/PackedInt64Array.xml b/doc/classes/PackedInt64Array.xml
index c7b69d4ad5..ff48eb1aad 100644
--- a/doc/classes/PackedInt64Array.xml
+++ b/doc/classes/PackedInt64Array.xml
@@ -96,7 +96,7 @@
Appends a value to the array.
</description>
</method>
- <method name="remove">
+ <method name="remove_at">
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
diff --git a/doc/classes/PackedStringArray.xml b/doc/classes/PackedStringArray.xml
index dfebfb718b..4204277ea2 100644
--- a/doc/classes/PackedStringArray.xml
+++ b/doc/classes/PackedStringArray.xml
@@ -96,7 +96,7 @@
Appends a string element at end of the array.
</description>
</method>
- <method name="remove">
+ <method name="remove_at">
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
diff --git a/doc/classes/PackedVector2Array.xml b/doc/classes/PackedVector2Array.xml
index bf9b7e97d4..e6a7b2fa41 100644
--- a/doc/classes/PackedVector2Array.xml
+++ b/doc/classes/PackedVector2Array.xml
@@ -96,7 +96,7 @@
Inserts a [Vector2] at the end.
</description>
</method>
- <method name="remove">
+ <method name="remove_at">
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
diff --git a/doc/classes/PackedVector3Array.xml b/doc/classes/PackedVector3Array.xml
index b439f8f217..6992bbca01 100644
--- a/doc/classes/PackedVector3Array.xml
+++ b/doc/classes/PackedVector3Array.xml
@@ -95,7 +95,7 @@
Inserts a [Vector3] at the end.
</description>
</method>
- <method name="remove">
+ <method name="remove_at">
<return type="void" />
<argument index="0" name="index" type="int" />
<description>
diff --git a/editor/action_map_editor.cpp b/editor/action_map_editor.cpp
index 3ca3576de6..dc0c62fbc9 100644
--- a/editor/action_map_editor.cpp
+++ b/editor/action_map_editor.cpp
@@ -847,7 +847,7 @@ void ActionMapEditor::_tree_button_pressed(Object *p_item, int p_column, int p_i
int event_index = item->get_meta("__index");
Array events = action["events"];
- events.remove(event_index);
+ events.remove_at(event_index);
action["events"] = events;
emit_signal(SNAME("action_edited"), action_name, action);
diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp
index b954c87476..d00fdd0ce7 100644
--- a/editor/connections_dialog.cpp
+++ b/editor/connections_dialog.cpp
@@ -240,7 +240,7 @@ void ConnectDialog::_remove_bind() {
int idx = st.get_slice("/", 1).to_int() - 1;
ERR_FAIL_INDEX(idx, cdbinds->params.size());
- cdbinds->params.remove(idx);
+ cdbinds->params.remove_at(idx);
cdbinds->notify_changed();
}
@@ -723,7 +723,7 @@ void ConnectionsDock::_open_connection_dialog(TreeItem &item) {
c = '_';
} else {
// Remove any other characters.
- midname.remove(i);
+ midname.remove_at(i);
i--;
continue;
}
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp
index 72aea9b630..dec4f50f03 100644
--- a/editor/create_dialog.cpp
+++ b/editor/create_dialog.cpp
@@ -576,7 +576,7 @@ void CreateDialog::drop_data_fw(const Point2 &p_point, const Variant &p_data, Co
drop_idx--;
}
- favorite_list.remove(from_idx);
+ favorite_list.remove_at(from_idx);
if (ds < 0) {
favorite_list.insert(drop_idx, type);
diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp
index aee9c21007..a163b468e6 100644
--- a/editor/editor_data.cpp
+++ b/editor/editor_data.cpp
@@ -70,7 +70,7 @@ void EditorHistory::cleanup_history() {
}
if (fail) {
- history.remove(i);
+ history.remove_at(i);
i--;
}
}
@@ -510,7 +510,7 @@ void EditorData::remove_custom_type(const String &p_type) {
for (Map<String, Vector<CustomType>>::Element *E = custom_types.front(); E; E = E->next()) {
for (int i = 0; i < E->get().size(); i++) {
if (E->get()[i].name == p_type) {
- E->get().remove(i);
+ E->get().remove_at(i);
if (E->get().is_empty()) {
custom_types.erase(E->key());
}
@@ -570,7 +570,7 @@ void EditorData::remove_scene(int p_idx) {
ScriptEditor::get_singleton()->close_builtin_scripts_from_scene(edited_scene[p_idx].path);
}
- edited_scene.remove(p_idx);
+ edited_scene.remove_at(p_idx);
}
bool EditorData::_find_updated_instances(Node *p_root, Node *p_node, Set<String> &checked_paths) {
@@ -751,7 +751,7 @@ void EditorData::move_edited_scene_to_index(int p_idx) {
ERR_FAIL_INDEX(p_idx, edited_scene.size());
EditedScene es = edited_scene[current_edited_scene];
- edited_scene.remove(current_edited_scene);
+ edited_scene.remove_at(current_edited_scene);
edited_scene.insert(p_idx, es);
current_edited_scene = p_idx;
}
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index e78ca7cd64..03d91ebcba 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -1534,7 +1534,7 @@ Ref<EditorExportPreset> EditorExport::get_export_preset(int p_idx) {
}
void EditorExport::remove_export_preset(int p_idx) {
- export_presets.remove(p_idx);
+ export_presets.remove_at(p_idx);
save_presets();
}
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp
index 2d7c31b64c..bea5c99c1a 100644
--- a/editor/editor_file_dialog.cpp
+++ b/editor/editor_file_dialog.cpp
@@ -302,7 +302,7 @@ void EditorFileDialog::_post_popup() {
bool exists = dir_access->dir_exists(recentd[i]);
if (!exists) {
// Remove invalid directory from the list of Recent directories.
- recentd.remove(i--);
+ recentd.remove_at(i--);
} else {
recent->add_item(name, folder);
recent->set_item_metadata(recent->get_item_count() - 1, recentd[i]);
@@ -1445,7 +1445,7 @@ void EditorFileDialog::_save_to_recent() {
for (int i = 0; i < recent.size(); i++) {
bool cres = recent[i].begins_with("res://");
if (recent[i] == dir || (res == cres && count > max)) {
- recent.remove(i);
+ recent.remove_at(i);
i--;
} else {
count++;
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp
index d141447044..4f02a82fb5 100644
--- a/editor/editor_file_system.cpp
+++ b/editor/editor_file_system.cpp
@@ -577,7 +577,7 @@ bool EditorFileSystem::_update_scan_actions() {
ERR_CONTINUE(idx == -1);
_delete_internal_files(ia.dir->files[idx]->file);
memdelete(ia.dir->files[idx]);
- ia.dir->files.remove(idx);
+ ia.dir->files.remove_at(idx);
fs_changed = true;
@@ -1536,7 +1536,7 @@ void EditorFileSystem::update_file(const String &p_file) {
}
}
memdelete(fs->files[cpos]);
- fs->files.remove(cpos);
+ fs->files.remove_at(cpos);
}
call_deferred(SNAME("emit_signal"), "filesystem_changed"); //update later
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index 2729b1eb3b..e1fae47057 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -1608,11 +1608,11 @@ void EditorInspectorArray::_move_element(int p_element_index, int p_to_pos) {
properties_as_array.insert(p_to_pos < 0 ? properties_as_array.size() : p_to_pos, Dictionary());
} else if (p_to_pos < 0) {
// Delete the element.
- properties_as_array.remove(p_element_index);
+ properties_as_array.remove_at(p_element_index);
} else {
// Move the element.
properties_as_array.insert(p_to_pos, properties_as_array[p_element_index].duplicate());
- properties_as_array.remove(p_to_pos < p_element_index ? p_element_index + 1 : p_element_index);
+ properties_as_array.remove_at(p_to_pos < p_element_index ? p_element_index + 1 : p_element_index);
}
// Change the array size then set the properties.
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 69a59b7ddb..6aaf0b063f 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -831,7 +831,7 @@ void EditorNode::_remove_plugin_from_enabled(const String &p_name) {
PackedStringArray enabled_plugins = ps->get("editor_plugins/enabled");
for (int i = 0; i < enabled_plugins.size(); ++i) {
if (enabled_plugins.get(i) == p_name) {
- enabled_plugins.remove(i);
+ enabled_plugins.remove_at(i);
break;
}
}
@@ -3199,7 +3199,7 @@ void EditorNode::remove_editor_plugin(EditorPlugin *p_editor, bool p_config_chan
}
memdelete(singleton->main_editor_buttons[i]);
- singleton->main_editor_buttons.remove(i);
+ singleton->main_editor_buttons.remove_at(i);
break;
}
@@ -3758,7 +3758,7 @@ void EditorNode::_open_recent_scene(int p_idx) {
ERR_FAIL_INDEX(p_idx, rc.size());
if (load_scene(rc[p_idx]) != OK) {
- rc.remove(p_idx);
+ rc.remove_at(p_idx);
EditorSettings::get_singleton()->set_project_metadata("recent_files", "scenes", rc);
_update_recent_scenes();
}
@@ -5177,7 +5177,7 @@ void EditorNode::remove_bottom_panel_item(Control *p_item) {
bottom_panel_vb->remove_child(bottom_panel_items[i].control);
bottom_panel_hb_editors->remove_child(bottom_panel_items[i].button);
memdelete(bottom_panel_items[i].button);
- bottom_panel_items.remove(i);
+ bottom_panel_items.remove_at(i);
break;
}
}
diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp
index a3b6f6e59b..0f59c8281f 100644
--- a/editor/editor_properties_array_dict.cpp
+++ b/editor/editor_properties_array_dict.cpp
@@ -413,7 +413,7 @@ void EditorPropertyArray::update_property() {
void EditorPropertyArray::_remove_pressed(int p_index) {
Variant array = object->get_array();
- array.call("remove", p_index);
+ array.call("remove_at", p_index);
emit_changed(get_edited_property(), array, "", false);
update_property();
diff --git a/editor/editor_run.cpp b/editor/editor_run.cpp
index d7daa0c750..0a77a8b0bb 100644
--- a/editor/editor_run.cpp
+++ b/editor/editor_run.cpp
@@ -201,7 +201,7 @@ Error EditorRun::run(const String &p_scene, const String &p_custom_args, const L
Vector<String> exec_args = p_custom_args.substr(0, placeholder_pos).split(" ", false);
if (exec_args.size() >= 1) {
exec = exec_args[0];
- exec_args.remove(0);
+ exec_args.remove_at(0);
// Append the Godot executable name before we append executable arguments
// (since the order is reversed when using `push_front()`).
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index 7ae3dcd44f..f40a048b75 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -197,7 +197,7 @@ Vector<String> FileSystemDock::_compute_uncollapsed_paths() {
child = child->get_next();
}
}
- needs_check.remove(0);
+ needs_check.remove_at(0);
}
}
}
@@ -1093,7 +1093,7 @@ void FileSystemDock::_push_to_history() {
history_pos++;
if (history.size() > history_max_size) {
- history.remove(0);
+ history.remove_at(0);
history_pos = history_max_size - 1;
}
}
@@ -1670,7 +1670,7 @@ Vector<String> FileSystemDock::_remove_self_included_paths(Vector<String> select
String last_path = "";
for (int i = 0; i < selected_strings.size(); i++) {
if (last_path != "" && selected_strings[i].begins_with(last_path)) {
- selected_strings.remove(i);
+ selected_strings.remove_at(i);
i--;
}
if (selected_strings[i].ends_with("/")) {
@@ -1704,7 +1704,7 @@ void FileSystemDock::_tree_rmb_option(int p_option) {
child = child->get_next();
}
- needs_check.remove(0);
+ needs_check.remove_at(0);
}
}
} break;
@@ -2229,7 +2229,7 @@ void FileSystemDock::drop_data_fw(const Point2 &p_point, const Variant &p_data,
drop_position -= offset;
to_remove.sort();
for (int i = 0; i < to_remove.size(); i++) {
- dirs.remove(to_remove[i] - i);
+ dirs.remove_at(to_remove[i] - i);
}
// Re-add them at the right position.
diff --git a/editor/import/collada.cpp b/editor/import/collada.cpp
index 19b4943e6d..c34379f1ec 100644
--- a/editor/import/collada.cpp
+++ b/editor/import/collada.cpp
@@ -2024,7 +2024,7 @@ void Collada::_create_skeletons(Collada::Node **p_node, NodeSkeleton *p_skeleton
bool Collada::_remove_node(Node *p_parent, Node *p_node) {
for (int i = 0; i < p_parent->children.size(); i++) {
if (p_parent->children[i] == p_node) {
- p_parent->children.remove(i);
+ p_parent->children.remove_at(i);
return true;
}
if (_remove_node(p_parent->children[i], p_node)) {
@@ -2038,7 +2038,7 @@ bool Collada::_remove_node(Node *p_parent, Node *p_node) {
void Collada::_remove_node(VisualScene *p_vscene, Node *p_node) {
for (int i = 0; i < p_vscene->root_nodes.size(); i++) {
if (p_vscene->root_nodes[i] == p_node) {
- p_vscene->root_nodes.remove(i);
+ p_vscene->root_nodes.remove_at(i);
return;
}
if (_remove_node(p_vscene->root_nodes[i], p_node)) {
@@ -2271,7 +2271,7 @@ bool Collada::_move_geometry_to_skeletons(VisualScene *p_vscene, Node *p_node, L
for (int i = 0; i < p_node->children.size(); i++) {
if (_move_geometry_to_skeletons(p_vscene, p_node->children[i], p_mgeom)) {
- p_node->children.remove(i);
+ p_node->children.remove_at(i);
i--;
}
}
@@ -2325,7 +2325,7 @@ void Collada::_optimize() {
for (int i = 0; i < vs.root_nodes.size(); i++) {
List<Node *> mgeom;
if (_move_geometry_to_skeletons(&vs, vs.root_nodes[i], &mgeom)) {
- vs.root_nodes.remove(i);
+ vs.root_nodes.remove_at(i);
i--;
}
diff --git a/editor/localization_editor.cpp b/editor/localization_editor.cpp
index 3fe1aa557d..5c25e6aae9 100644
--- a/editor/localization_editor.cpp
+++ b/editor/localization_editor.cpp
@@ -98,7 +98,7 @@ void LocalizationEditor::_translation_delete(Object *p_item, int p_column, int p
ERR_FAIL_INDEX(idx, translations.size());
- translations.remove(idx);
+ translations.remove_at(idx);
undo_redo->create_action(TTR("Remove Translation"));
undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/translations", translations);
@@ -276,7 +276,7 @@ void LocalizationEditor::_translation_res_option_delete(Object *p_item, int p_co
ERR_FAIL_COND(!remaps.has(key));
PackedStringArray r = remaps[key];
ERR_FAIL_INDEX(idx, r.size());
- r.remove(idx);
+ r.remove_at(idx);
remaps[key] = r;
undo_redo->create_action(TTR("Remove Resource Remap Option"));
@@ -321,7 +321,7 @@ void LocalizationEditor::_translation_filter_option_changed() {
}
} else {
if (l_idx != -1) {
- f_locales.remove(l_idx);
+ f_locales.remove_at(l_idx);
}
}
@@ -397,7 +397,7 @@ void LocalizationEditor::_pot_delete(Object *p_item, int p_column, int p_button)
ERR_FAIL_INDEX(idx, pot_translations.size());
- pot_translations.remove(idx);
+ pot_translations.remove_at(idx);
undo_redo->create_action(TTR("Remove file from POT generation"));
undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/translations_pot_files", pot_translations);
diff --git a/editor/plugins/abstract_polygon_2d_editor.cpp b/editor/plugins/abstract_polygon_2d_editor.cpp
index 7cafbbc1c4..58f92a98a6 100644
--- a/editor/plugins/abstract_polygon_2d_editor.cpp
+++ b/editor/plugins/abstract_polygon_2d_editor.cpp
@@ -446,7 +446,7 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
if (k->get_keycode() == Key::KEY_DELETE || k->get_keycode() == Key::BACKSPACE) {
if (wip_active && selected_point.polygon == -1) {
if (wip.size() > selected_point.vertex) {
- wip.remove(selected_point.vertex);
+ wip.remove_at(selected_point.vertex);
_wip_changed();
selected_point = wip.size() - 1;
canvas_item_editor->update_viewport();
@@ -599,7 +599,7 @@ void AbstractPolygon2DEditor::remove_point(const Vertex &p_vertex) {
Vector<Vector2> vertices = _get_polygon(p_vertex.polygon);
if (vertices.size() > (_is_line() ? 2 : 3)) {
- vertices.remove(p_vertex.vertex);
+ vertices.remove_at(p_vertex.vertex);
undo_redo->create_action(TTR("Edit Polygon (Remove Point)"));
_action_set_polygon(p_vertex.polygon, vertices);
diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp
index 2aded41810..75d2bed1b2 100644
--- a/editor/plugins/animation_blend_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp
@@ -58,7 +58,7 @@ void AnimationNodeBlendTreeEditor::add_custom_type(const String &p_name, const R
void AnimationNodeBlendTreeEditor::remove_custom_type(const Ref<Script> &p_script) {
for (int i = 0; i < add_options.size(); i++) {
if (add_options[i].script == p_script) {
- add_options.remove(i);
+ add_options.remove_at(i);
return;
}
}
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 1fcbb03e05..a3378d1550 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -658,7 +658,7 @@ void CanvasItemEditor::_get_canvas_items_at_pos(const Point2 &p_pos, Vector<_Sel
//Remove the item if invalid
if (!canvas_item || duplicate || (canvas_item != scene && canvas_item->get_owner() != scene && !scene->is_editable_instance(canvas_item->get_owner())) || (!p_allow_locked && _is_node_locked(canvas_item))) {
- r_items.remove(i);
+ r_items.remove_at(i);
i--;
} else {
r_items.write[i].item = canvas_item;
@@ -1045,7 +1045,7 @@ bool CanvasItemEditor::_gui_input_rulers_and_guides(const Ref<InputEvent> &p_eve
}
} else {
if (dragged_guide_index >= 0) {
- vguides.remove(dragged_guide_index);
+ vguides.remove_at(dragged_guide_index);
undo_redo->create_action(TTR("Remove Vertical Guide"));
if (vguides.is_empty()) {
undo_redo->add_do_method(EditorNode::get_singleton()->get_edited_scene(), "remove_meta", "_edit_vertical_guides_");
@@ -1078,7 +1078,7 @@ bool CanvasItemEditor::_gui_input_rulers_and_guides(const Ref<InputEvent> &p_eve
}
} else {
if (dragged_guide_index >= 0) {
- hguides.remove(dragged_guide_index);
+ hguides.remove_at(dragged_guide_index);
undo_redo->create_action(TTR("Remove Horizontal Guide"));
if (hguides.is_empty()) {
undo_redo->add_do_method(EditorNode::get_singleton()->get_edited_scene(), "remove_meta", "_edit_horizontal_guides_");
diff --git a/editor/plugins/collision_polygon_3d_editor_plugin.cpp b/editor/plugins/collision_polygon_3d_editor_plugin.cpp
index 7a8680c4dd..4c728ff757 100644
--- a/editor/plugins/collision_polygon_3d_editor_plugin.cpp
+++ b/editor/plugins/collision_polygon_3d_editor_plugin.cpp
@@ -285,7 +285,7 @@ EditorPlugin::AfterGUIInput CollisionPolygon3DEditor::forward_spatial_gui_input(
if (closest_idx >= 0) {
undo_redo->create_action(TTR("Edit Poly (Remove Point)"));
undo_redo->add_undo_method(node, "set_polygon", poly);
- poly.remove(closest_idx);
+ poly.remove_at(closest_idx);
undo_redo->add_do_method(node, "set_polygon", poly);
undo_redo->add_do_method(this, "_polygon_draw");
undo_redo->add_undo_method(this, "_polygon_draw");
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index d6e6f0597a..d3b462cda5 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -1238,7 +1238,7 @@ void Node3DEditorViewport::_list_select(Ref<InputEventMouseButton> b) {
Node3D *item = selection_results[i].item;
if (item != scene && item->get_owner() != scene && item != scene->get_deepest_editable_node(item)) {
//invalid result
- selection_results.remove(i);
+ selection_results.remove_at(i);
i--;
}
}
diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp
index 6ffe99d4d0..79cfcbec64 100644
--- a/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -584,10 +584,10 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
return;
}
- uv_create_poly_prev.remove(closest);
- uv_create_uv_prev.remove(closest);
+ uv_create_poly_prev.remove_at(closest);
+ uv_create_uv_prev.remove_at(closest);
if (uv_create_colors_prev.size()) {
- uv_create_colors_prev.remove(closest);
+ uv_create_colors_prev.remove_at(closest);
}
undo_redo->create_action(TTR("Remove Internal Vertex"));
@@ -599,7 +599,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
undo_redo->add_undo_method(node, "set_vertex_colors", node->get_vertex_colors());
for (int i = 0; i < node->get_bone_count(); i++) {
Vector<float> bonew = node->get_bone_weights(i);
- bonew.remove(closest);
+ bonew.remove_at(closest);
undo_redo->add_do_method(node, "set_bone_weights", i, bonew);
undo_redo->add_undo_method(node, "set_bone_weights", i, node->get_bone_weights(i));
}
@@ -702,7 +702,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
}
if (erase_index != -1) {
- polygons.remove(erase_index);
+ polygons.remove_at(erase_index);
undo_redo->create_action(TTR("Remove Custom Polygon"));
undo_redo->add_do_method(node, "set_polygons", polygons);
undo_redo->add_undo_method(node, "set_polygons", node->get_polygons());
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 583862893c..ace8ee53e6 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -733,7 +733,7 @@ void ScriptEditor::_open_recent_script(int p_idx) {
return;
}
- rc.remove(p_idx);
+ rc.remove_at(p_idx);
EditorSettings::get_singleton()->set_project_metadata("recent_files", "scripts", rc);
_update_recent_scripts();
_show_error_dialog(path);
@@ -785,7 +785,7 @@ void ScriptEditor::_close_tab(int p_idx, bool p_save, bool p_history_back) {
for (int i = 0; i < history.size(); i++) {
if (history[i].control == tselected) {
- history.remove(i);
+ history.remove_at(i);
i--;
history_pos--;
}
diff --git a/editor/plugins/tiles/tile_data_editors.cpp b/editor/plugins/tiles/tile_data_editors.cpp
index d165f44334..44cf6b42bc 100644
--- a/editor/plugins/tiles/tile_data_editors.cpp
+++ b/editor/plugins/tiles/tile_data_editors.cpp
@@ -516,7 +516,7 @@ void GenericTilePolygonEditor::_base_control_gui_input(Ref<InputEvent> p_event)
_grab_polygon_point(mb->get_position(), xform, closest_polygon, closest_point);
if (closest_polygon >= 0) {
PackedVector2Array old_polygon = polygons[closest_polygon];
- polygons[closest_polygon].remove(closest_point);
+ polygons[closest_polygon].remove_at(closest_point);
undo_redo->create_action(TTR("Edit Polygons"));
if (polygons[closest_polygon].size() < 3) {
remove_polygon(closest_polygon);
@@ -563,7 +563,7 @@ void GenericTilePolygonEditor::_base_control_gui_input(Ref<InputEvent> p_event)
_grab_polygon_point(mb->get_position(), xform, closest_polygon, closest_point);
if (closest_polygon >= 0) {
PackedVector2Array old_polygon = polygons[closest_polygon];
- polygons[closest_polygon].remove(closest_point);
+ polygons[closest_polygon].remove_at(closest_point);
undo_redo->create_action(TTR("Edit Polygons"));
if (polygons[closest_polygon].size() < 3) {
remove_polygon(closest_polygon);
@@ -676,7 +676,7 @@ int GenericTilePolygonEditor::add_polygon(Vector<Point2> p_polygon, int p_index)
void GenericTilePolygonEditor::remove_polygon(int p_index) {
ERR_FAIL_INDEX(p_index, (int)polygons.size());
- polygons.remove(p_index);
+ polygons.remove_at(p_index);
if (polygons.size() == 0) {
button_create->set_pressed(true);
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index b1a9da9e26..da73fc093c 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -1061,7 +1061,7 @@ void VisualShaderEditor::remove_plugin(const Ref<VisualShaderNodePlugin> &p_plug
void VisualShaderEditor::clear_custom_types() {
for (int i = 0; i < add_options.size(); i++) {
if (add_options[i].is_custom) {
- add_options.remove(i);
+ add_options.remove_at(i);
i--;
}
}
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index 8ee90a1184..4318f30add 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -1543,7 +1543,7 @@ void ProjectList::remove_project(int p_index, bool p_update_settings) {
}
memdelete(item.control);
- _projects.remove(p_index);
+ _projects.remove_at(p_index);
if (p_update_settings) {
EditorSettings::get_singleton()->erase("projects/" + item.project_key);
@@ -1733,7 +1733,7 @@ void ProjectList::erase_selected_projects(bool p_delete_project_contents) {
}
memdelete(item.control);
- _projects.remove(i);
+ _projects.remove_at(i);
--i;
}
}
diff --git a/editor/settings_config_dialog.cpp b/editor/settings_config_dialog.cpp
index 684f8aa37e..e1229729ac 100644
--- a/editor/settings_config_dialog.cpp
+++ b/editor/settings_config_dialog.cpp
@@ -486,7 +486,7 @@ void EditorSettingsDialog::_shortcut_button_pressed(Object *p_item, int p_column
_update_shortcut_events(current_edited_identifier, Array());
}
} else if (type == "event") {
- current_events.remove(current_event_index);
+ current_events.remove_at(current_event_index);
if (is_editing_action) {
_update_builtin_action(current_edited_identifier, current_events);
@@ -564,7 +564,7 @@ void EditorSettingsDialog::drop_data_fw(const Point2 &p_point, const Variant &p_
Array events = selected->get_parent()->get_meta("events");
Variant event_moved = events[index_moving_from];
- events.remove(index_moving_from);
+ events.remove_at(index_moving_from);
events.insert(target_event_index, event_moved);
String ident = selected->get_parent()->get_meta("shortcut_identifier");
diff --git a/modules/bullet/area_bullet.cpp b/modules/bullet/area_bullet.cpp
index 435069e25c..10a71d65df 100644
--- a/modules/bullet/area_bullet.cpp
+++ b/modules/bullet/area_bullet.cpp
@@ -89,7 +89,7 @@ void AreaBullet::dispatch_callbacks() {
// This object's last shape being removed.
overlapping_shape.other_object->on_exit_area(this);
}
- overlapping_shapes.remove(i); // Remove after callback
+ overlapping_shapes.remove_at(i); // Remove after callback
break;
case OVERLAP_STATE_INSIDE: {
if (overlapping_shape.other_object->getType() == TYPE_RIGID_BODY) {
@@ -188,7 +188,7 @@ void AreaBullet::remove_object_overlaps(CollisionObjectBullet *p_object) {
// Reverse order so items can be removed.
for (int i = overlapping_shapes.size() - 1; i >= 0; i--) {
if (overlapping_shapes[i].other_object == p_object) {
- overlapping_shapes.remove(i);
+ overlapping_shapes.remove_at(i);
}
}
}
diff --git a/modules/bullet/collision_object_bullet.cpp b/modules/bullet/collision_object_bullet.cpp
index 987a45ad5f..cbb746800d 100644
--- a/modules/bullet/collision_object_bullet.cpp
+++ b/modules/bullet/collision_object_bullet.cpp
@@ -273,7 +273,7 @@ void RigidCollisionObjectBullet::remove_shape_full(ShapeBullet *p_shape) {
for (int i = shapes.size() - 1; 0 <= i; --i) {
if (p_shape == shapes[i].shape) {
internal_shape_destroy(i);
- shapes.remove(i);
+ shapes.remove_at(i);
}
}
reload_shapes();
@@ -282,7 +282,7 @@ void RigidCollisionObjectBullet::remove_shape_full(ShapeBullet *p_shape) {
void RigidCollisionObjectBullet::remove_shape_full(int p_index) {
ERR_FAIL_INDEX(p_index, get_shape_count());
internal_shape_destroy(p_index);
- shapes.remove(p_index);
+ shapes.remove_at(p_index);
reload_shapes();
}
diff --git a/modules/bullet/soft_body_bullet.cpp b/modules/bullet/soft_body_bullet.cpp
index 3a2370ff31..c0ffffa364 100644
--- a/modules/bullet/soft_body_bullet.cpp
+++ b/modules/bullet/soft_body_bullet.cpp
@@ -442,7 +442,7 @@ void SoftBodyBullet::unpin_node(int p_node_index) {
}
const int id = search_node_pinned(p_node_index);
if (-1 != id) {
- pinned_nodes.remove(id);
+ pinned_nodes.remove_at(id);
}
}
diff --git a/modules/csg/csg.cpp b/modules/csg/csg.cpp
index a7742ef415..a70e153abd 100644
--- a/modules/csg/csg.cpp
+++ b/modules/csg/csg.cpp
@@ -933,7 +933,7 @@ void CSGBrushOperation::Build2DFaces::_merge_faces(const Vector<int> &p_segment_
merge_faces_idx.sort();
merge_faces_idx.reverse();
for (int i = 0; i < merge_faces_idx.size(); ++i) {
- faces.remove(merge_faces_idx[i]);
+ faces.remove_at(merge_faces_idx[i]);
}
if (degenerate_points.size() == 0) {
@@ -983,7 +983,7 @@ void CSGBrushOperation::Build2DFaces::_merge_faces(const Vector<int> &p_segment_
// If new vertex snaps to degenerate vertex, just delete this face.
if (degenerate_idx == opposite_vertex_idx) {
- faces.remove(face_idx);
+ faces.remove_at(face_idx);
// Update index.
--face_idx;
break;
@@ -999,7 +999,7 @@ void CSGBrushOperation::Build2DFaces::_merge_faces(const Vector<int> &p_segment_
right_face.vertex_idx[0] = opposite_vertex_idx;
right_face.vertex_idx[1] = face.vertex_idx[face_edge_idx];
right_face.vertex_idx[2] = degenerate_idx;
- faces.remove(face_idx);
+ faces.remove_at(face_idx);
faces.insert(face_idx, right_face);
faces.insert(face_idx, left_face);
@@ -1070,7 +1070,7 @@ void CSGBrushOperation::Build2DFaces::_find_edge_intersections(const Vector2 p_s
// If new vertex snaps to opposite vertex, just delete this face.
if (new_vertex_idx == opposite_vertex_idx) {
- faces.remove(face_idx);
+ faces.remove_at(face_idx);
// Update index.
--face_idx;
break;
@@ -1092,7 +1092,7 @@ void CSGBrushOperation::Build2DFaces::_find_edge_intersections(const Vector2 p_s
right_face.vertex_idx[0] = opposite_vertex_idx;
right_face.vertex_idx[1] = face.vertex_idx[face_edge_idx];
right_face.vertex_idx[2] = new_vertex_idx;
- faces.remove(face_idx);
+ faces.remove_at(face_idx);
faces.insert(face_idx, right_face);
faces.insert(face_idx, left_face);
@@ -1162,7 +1162,7 @@ int CSGBrushOperation::Build2DFaces::_insert_point(const Vector2 &p_point) {
// If new vertex snaps to opposite vertex, just delete this face.
if (new_vertex_idx == opposite_vertex_idx) {
- faces.remove(face_idx);
+ faces.remove_at(face_idx);
// Update index.
--face_idx;
break;
@@ -1187,7 +1187,7 @@ int CSGBrushOperation::Build2DFaces::_insert_point(const Vector2 &p_point) {
right_face.vertex_idx[0] = opposite_vertex_idx;
right_face.vertex_idx[1] = face.vertex_idx[face_edge_idx];
right_face.vertex_idx[2] = new_vertex_idx;
- faces.remove(face_idx);
+ faces.remove_at(face_idx);
faces.insert(face_idx, right_face);
faces.insert(face_idx, left_face);
@@ -1222,7 +1222,7 @@ int CSGBrushOperation::Build2DFaces::_insert_point(const Vector2 &p_point) {
new_face.vertex_idx[2] = new_vertex_idx;
faces.push_back(new_face);
}
- faces.remove(face_idx);
+ faces.remove_at(face_idx);
// No need to check other faces.
break;
diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp
index 68da588c3d..b76c2c0437 100644
--- a/modules/gdscript/gdscript.cpp
+++ b/modules/gdscript/gdscript.cpp
@@ -427,7 +427,7 @@ void GDScript::_add_doc(const DocData::ClassDoc &p_inner_class) {
} else {
for (int i = 0; i < docs.size(); i++) {
if (docs[i].name == p_inner_class.name) {
- docs.remove(i);
+ docs.remove_at(i);
break;
}
}
@@ -2131,7 +2131,7 @@ String GDScriptLanguage::get_global_class_name(const String &p_path, String *r_b
const GDScriptParser::ClassNode *inner_class = subclass->members[i].m_class;
if (inner_class->identifier->name == extend_classes[0]) {
- extend_classes.remove(0);
+ extend_classes.remove_at(0);
found = true;
subclass = inner_class;
break;
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp
index d9cf9f4f10..41b2d2191c 100644
--- a/modules/gdscript/gdscript_parser.cpp
+++ b/modules/gdscript/gdscript_parser.cpp
@@ -3414,7 +3414,7 @@ bool GDScriptParser::validate_annotation_arguments(AnnotationNode *p_annotation)
p_annotation->resolved_arguments.push_back(r);
if (error.error != Callable::CallError::CALL_OK) {
push_error(vformat(R"(Expected %s as argument %d of annotation "%s").)", Variant::get_type_name(parameter.type), i + 1, p_annotation->name));
- p_annotation->resolved_arguments.remove(p_annotation->resolved_arguments.size() - 1);
+ p_annotation->resolved_arguments.remove_at(p_annotation->resolved_arguments.size() - 1);
return false;
}
break;
@@ -3438,7 +3438,7 @@ bool GDScriptParser::validate_annotation_arguments(AnnotationNode *p_annotation)
p_annotation->resolved_arguments.push_back(r);
if (error.error != Callable::CallError::CALL_OK) {
push_error(vformat(R"(Expected %s as argument %d of annotation "%s").)", Variant::get_type_name(parameter.type), i + 1, p_annotation->name));
- p_annotation->resolved_arguments.remove(p_annotation->resolved_arguments.size() - 1);
+ p_annotation->resolved_arguments.remove_at(p_annotation->resolved_arguments.size() - 1);
return false;
}
break;
diff --git a/modules/gdscript/language_server/gdscript_language_protocol.cpp b/modules/gdscript/language_server/gdscript_language_protocol.cpp
index 5cf1e0fc5f..578943696e 100644
--- a/modules/gdscript/language_server/gdscript_language_protocol.cpp
+++ b/modules/gdscript/language_server/gdscript_language_protocol.cpp
@@ -115,7 +115,7 @@ Error GDScriptLanguageProtocol::LSPeer::send_data() {
// Response sent
if (res_sent >= c_res.size() - 1) {
res_sent = 0;
- res_queue.remove(0);
+ res_queue.remove_at(0);
}
}
return OK;
diff --git a/modules/mono/glue/collections_glue.cpp b/modules/mono/glue/collections_glue.cpp
index 86976de244..e367ecb7d6 100644
--- a/modules/mono/glue/collections_glue.cpp
+++ b/modules/mono/glue/collections_glue.cpp
@@ -144,7 +144,7 @@ void godot_icall_Array_Insert(Array *ptr, int32_t index, MonoObject *item) {
MonoBoolean godot_icall_Array_Remove(Array *ptr, MonoObject *item) {
int idx = ptr->find(GDMonoMarshal::mono_object_to_variant(item));
if (idx >= 0) {
- ptr->remove(idx);
+ ptr->remove_at(idx);
return true;
}
return false;
@@ -155,7 +155,7 @@ void godot_icall_Array_RemoveAt(Array *ptr, int32_t index) {
GDMonoUtils::set_pending_exception(mono_get_exception_index_out_of_range());
return;
}
- ptr->remove(index);
+ ptr->remove_at(index);
}
int32_t godot_icall_Array_Resize(Array *ptr, int32_t new_size) {
diff --git a/modules/navigation/godot_navigation_server.cpp b/modules/navigation/godot_navigation_server.cpp
index f600f07c87..ac3422187f 100644
--- a/modules/navigation/godot_navigation_server.cpp
+++ b/modules/navigation/godot_navigation_server.cpp
@@ -150,8 +150,8 @@ COMMAND_2(map_set_active, RID, p_map, bool, p_active) {
} else {
int map_index = active_maps.find(map);
ERR_FAIL_COND(map_index < 0);
- active_maps.remove(map_index);
- active_maps_update_id.remove(map_index);
+ active_maps.remove_at(map_index);
+ active_maps_update_id.remove_at(map_index);
}
}
@@ -469,8 +469,8 @@ COMMAND_1(free, RID, p_object) {
}
int map_index = active_maps.find(map);
- active_maps.remove(map_index);
- active_maps_update_id.remove(map_index);
+ active_maps.remove_at(map_index);
+ active_maps_update_id.remove_at(map_index);
map_owner.free(p_object);
} else if (region_owner.owns(p_object)) {
diff --git a/modules/text_server_adv/text_server_adv.cpp b/modules/text_server_adv/text_server_adv.cpp
index 1adaef4d84..f480c86088 100644
--- a/modules/text_server_adv/text_server_adv.cpp
+++ b/modules/text_server_adv/text_server_adv.cpp
@@ -2148,7 +2148,7 @@ void TextServerAdvanced::font_remove_texture(RID p_font_rid, const Vector2i &p_s
ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
ERR_FAIL_INDEX(p_texture_index, fd->cache[size]->textures.size());
- fd->cache[size]->textures.remove(p_texture_index);
+ fd->cache[size]->textures.remove_at(p_texture_index);
}
void TextServerAdvanced::font_set_texture_image(RID p_font_rid, const Vector2i &p_size, int p_texture_index, const Ref<Image> &p_image) {
diff --git a/modules/text_server_fb/text_server_fb.cpp b/modules/text_server_fb/text_server_fb.cpp
index 80ae10c005..5c06051211 100644
--- a/modules/text_server_fb/text_server_fb.cpp
+++ b/modules/text_server_fb/text_server_fb.cpp
@@ -1326,7 +1326,7 @@ void TextServerFallback::font_remove_texture(RID p_font_rid, const Vector2i &p_s
ERR_FAIL_COND(!_ensure_cache_for_size(fd, size));
ERR_FAIL_INDEX(p_texture_index, fd->cache[size]->textures.size());
- fd->cache[size]->textures.remove(p_texture_index);
+ fd->cache[size]->textures.remove_at(p_texture_index);
}
void TextServerFallback::font_set_texture_image(RID p_font_rid, const Vector2i &p_size, int p_texture_index, const Ref<Image> &p_image) {
diff --git a/modules/upnp/upnp.cpp b/modules/upnp/upnp.cpp
index 88d92b0083..64823deaba 100644
--- a/modules/upnp/upnp.cpp
+++ b/modules/upnp/upnp.cpp
@@ -257,7 +257,7 @@ void UPNP::set_device(int index, Ref<UPNPDevice> device) {
void UPNP::remove_device(int index) {
ERR_FAIL_INDEX(index, devices.size());
- devices.remove(index);
+ devices.remove_at(index);
}
void UPNP::clear_devices() {
diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp
index 700cc85672..34d8c0b1e6 100644
--- a/modules/visual_script/visual_script.cpp
+++ b/modules/visual_script/visual_script.cpp
@@ -661,7 +661,7 @@ void VisualScript::custom_signal_remove_argument(const StringName &p_func, int p
ERR_FAIL_COND(instances.size());
ERR_FAIL_COND(!custom_signals.has(p_func));
ERR_FAIL_INDEX(p_argidx, custom_signals[p_func].size());
- custom_signals[p_func].remove(p_argidx);
+ custom_signals[p_func].remove_at(p_argidx);
}
int VisualScript::custom_signal_get_argument_count(const StringName &p_func) const {
diff --git a/modules/visual_script/visual_script_expression.cpp b/modules/visual_script/visual_script_expression.cpp
index 55c707890f..699042ffa6 100644
--- a/modules/visual_script/visual_script_expression.cpp
+++ b/modules/visual_script/visual_script_expression.cpp
@@ -1190,7 +1190,7 @@ VisualScriptExpression::ENode *VisualScriptExpression::_parse_expression() {
op->nodes[1] = nullptr;
expression.write[i].is_op = false;
expression.write[i].node = op;
- expression.remove(i + 1);
+ expression.remove_at(i + 1);
}
} else {
@@ -1222,8 +1222,8 @@ VisualScriptExpression::ENode *VisualScriptExpression::_parse_expression() {
//replace all 3 nodes by this operator and make it an expression
expression.write[next_op - 1].node = op;
- expression.remove(next_op);
- expression.remove(next_op);
+ expression.remove_at(next_op);
+ expression.remove_at(next_op);
}
}
diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp
index 471d8ef0ae..b0af030981 100644
--- a/modules/visual_script/visual_script_nodes.cpp
+++ b/modules/visual_script/visual_script_nodes.cpp
@@ -253,7 +253,7 @@ String VisualScriptFunction::get_argument_name(int p_argidx) const {
void VisualScriptFunction::remove_argument(int p_argidx) {
ERR_FAIL_INDEX(p_argidx, arguments.size());
- arguments.remove(p_argidx);
+ arguments.remove_at(p_argidx);
ports_changed_notify();
}
@@ -623,7 +623,7 @@ void VisualScriptLists::remove_input_data_port(int p_argidx) {
ERR_FAIL_INDEX(p_argidx, inputports.size());
- inputports.remove(p_argidx);
+ inputports.remove_at(p_argidx);
ports_changed_notify();
notify_property_list_changed();
@@ -679,7 +679,7 @@ void VisualScriptLists::remove_output_data_port(int p_argidx) {
ERR_FAIL_INDEX(p_argidx, outputports.size());
- outputports.remove(p_argidx);
+ outputports.remove_at(p_argidx);
ports_changed_notify();
notify_property_list_changed();
diff --git a/platform/android/android_input_handler.cpp b/platform/android/android_input_handler.cpp
index dc259da886..52f80b3080 100644
--- a/platform/android/android_input_handler.cpp
+++ b/platform/android/android_input_handler.cpp
@@ -223,7 +223,7 @@ void AndroidInputHandler::process_touch(int p_event, int p_pointer, const Vector
ev->set_pressed(false);
ev->set_position(touch[i].pos);
Input::get_singleton()->parse_input_event(ev);
- touch.remove(i);
+ touch.remove_at(i);
break;
}
diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp
index 05cd63d935..c5d3cbd966 100644
--- a/platform/android/export/export_plugin.cpp
+++ b/platform/android/export/export_plugin.cpp
@@ -2212,7 +2212,7 @@ void EditorExportPlatformAndroid::get_command_line_flags(const Ref<EditorExportP
Vector<String> command_line_strings = cmdline.strip_edges().split(" ");
for (int i = 0; i < command_line_strings.size(); i++) {
if (command_line_strings[i].strip_edges().length() == 0) {
- command_line_strings.remove(i);
+ command_line_strings.remove_at(i);
i--;
}
}
diff --git a/platform/linuxbsd/display_server_x11.cpp b/platform/linuxbsd/display_server_x11.cpp
index 2a62780410..74ec8b652f 100644
--- a/platform/linuxbsd/display_server_x11.cpp
+++ b/platform/linuxbsd/display_server_x11.cpp
@@ -286,7 +286,7 @@ void DisplayServerX11::_flush_mouse_motion() {
XIDeviceEvent *event_data = (XIDeviceEvent *)event.xcookie.data;
if (event_data->evtype == XI_RawMotion) {
XFreeEventData(x11_display, &event.xcookie);
- polled_events.remove(event_index--);
+ polled_events.remove_at(event_index--);
continue;
}
XFreeEventData(x11_display, &event.xcookie);
diff --git a/platform/linuxbsd/joypad_linux.cpp b/platform/linuxbsd/joypad_linux.cpp
index 1c6afabfab..55cc21cc6c 100644
--- a/platform/linuxbsd/joypad_linux.cpp
+++ b/platform/linuxbsd/joypad_linux.cpp
@@ -253,7 +253,7 @@ void JoypadLinux::close_joypad(int p_id) {
if (joy.fd != -1) {
close(joy.fd);
joy.fd = -1;
- attached_devices.remove(attached_devices.find(joy.devpath));
+ attached_devices.remove_at(attached_devices.find(joy.devpath));
input->joy_connection_changed(p_id, false, "");
};
}
diff --git a/platform/osx/gl_manager_osx.mm b/platform/osx/gl_manager_osx.mm
index cce58530ee..60e0706fc0 100644
--- a/platform/osx/gl_manager_osx.mm
+++ b/platform/osx/gl_manager_osx.mm
@@ -75,7 +75,7 @@ Error GLManager_OSX::window_create(DisplayServer::WindowID p_window_id, id p_vie
win.window_view = p_view;
if (_create_context(win) != OK) {
- _windows.remove(_windows.size() - 1);
+ _windows.remove_at(_windows.size() - 1);
return FAILED;
}
diff --git a/platform/osx/joypad_osx.cpp b/platform/osx/joypad_osx.cpp
index 8405ed1da1..48d165d30b 100644
--- a/platform/osx/joypad_osx.cpp
+++ b/platform/osx/joypad_osx.cpp
@@ -264,7 +264,7 @@ void JoypadOSX::_device_removed(IOReturn p_res, IOHIDDeviceRef p_device) {
input->joy_connection_changed(device_list[device].id, false, "");
device_list.write[device].free();
- device_list.remove(device);
+ device_list.remove_at(device);
}
static String _hex_str(uint8_t p_byte) {
diff --git a/platform/uwp/export/export_plugin.cpp b/platform/uwp/export/export_plugin.cpp
index a54b85a803..192814efe4 100644
--- a/platform/uwp/export/export_plugin.cpp
+++ b/platform/uwp/export/export_plugin.cpp
@@ -376,7 +376,7 @@ Error EditorExportPlatformUWP::export_project(const Ref<EditorExportPreset> &p_p
Vector<String> cl = ((String)p_preset->get("command_line/extra_args")).strip_edges().split(" ");
for (int i = 0; i < cl.size(); i++) {
if (cl[i].strip_edges().length() == 0) {
- cl.remove(i);
+ cl.remove_at(i);
i--;
}
}
diff --git a/platform/windows/gl_manager_windows.cpp b/platform/windows/gl_manager_windows.cpp
index 1ce8b0b040..fe98f8b0ba 100644
--- a/platform/windows/gl_manager_windows.cpp
+++ b/platform/windows/gl_manager_windows.cpp
@@ -77,7 +77,7 @@ int GLManager_Windows::_find_or_create_display(GLWindow &win) {
if (err != OK) {
// not good
// delete the _display?
- _displays.remove(new_display_id);
+ _displays.remove_at(new_display_id);
return -1;
}
@@ -193,7 +193,7 @@ Error GLManager_Windows::window_create(DisplayServer::WindowID p_window_id, HWND
if (win.gldisplay_id == -1) {
// release DC?
- _windows.remove(_windows.size() - 1);
+ _windows.remove_at(_windows.size() - 1);
return FAILED;
}
diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp
index 24da2ce9ce..8bf95e6965 100644
--- a/scene/2d/audio_stream_player_2d.cpp
+++ b/scene/2d/audio_stream_player_2d.cpp
@@ -97,7 +97,7 @@ void AudioStreamPlayer2D::_notification(int p_what) {
while (stream_playbacks.size() > max_polyphony) {
AudioServer::get_singleton()->stop_playback_stream(stream_playbacks[0]);
- stream_playbacks.remove(0);
+ stream_playbacks.remove_at(0);
}
}
}
diff --git a/scene/2d/collision_object_2d.cpp b/scene/2d/collision_object_2d.cpp
index 4b348f12e6..bd13d96b01 100644
--- a/scene/2d/collision_object_2d.cpp
+++ b/scene/2d/collision_object_2d.cpp
@@ -434,7 +434,7 @@ void CollisionObject2D::shape_owner_remove_shape(uint32_t p_owner, int p_shape)
PhysicsServer2D::get_singleton()->body_remove_shape(rid, index_to_remove);
}
- shapes[p_owner].shapes.remove(p_shape);
+ shapes[p_owner].shapes.remove_at(p_shape);
for (KeyValue<uint32_t, ShapeData> &E : shapes) {
for (int i = 0; i < E.value.shapes.size(); i++) {
diff --git a/scene/2d/line_2d.cpp b/scene/2d/line_2d.cpp
index 37eb45c21d..00767ec22c 100644
--- a/scene/2d/line_2d.cpp
+++ b/scene/2d/line_2d.cpp
@@ -148,7 +148,7 @@ void Line2D::add_point(Vector2 p_pos, int p_atpos) {
}
void Line2D::remove_point(int i) {
- _points.remove(i);
+ _points.remove_at(i);
update();
}
diff --git a/scene/2d/navigation_region_2d.cpp b/scene/2d/navigation_region_2d.cpp
index 204ed72878..ecd79c23a7 100644
--- a/scene/2d/navigation_region_2d.cpp
+++ b/scene/2d/navigation_region_2d.cpp
@@ -207,7 +207,7 @@ void NavigationPolygon::set_outline(int p_idx, const Vector<Vector2> &p_outline)
void NavigationPolygon::remove_outline(int p_idx) {
ERR_FAIL_INDEX(p_idx, outlines.size());
- outlines.remove(p_idx);
+ outlines.remove_at(p_idx);
rect_cache_dirty = true;
}
diff --git a/scene/2d/polygon_2d.cpp b/scene/2d/polygon_2d.cpp
index f00959bbb6..7a237bf557 100644
--- a/scene/2d/polygon_2d.cpp
+++ b/scene/2d/polygon_2d.cpp
@@ -532,7 +532,7 @@ Vector<float> Polygon2D::get_bone_weights(int p_index) const {
void Polygon2D::erase_bone(int p_idx) {
ERR_FAIL_INDEX(p_idx, bone_weights.size());
- bone_weights.remove(p_idx);
+ bone_weights.remove_at(p_idx);
}
void Polygon2D::clear_bones() {
diff --git a/scene/2d/skeleton_2d.cpp b/scene/2d/skeleton_2d.cpp
index 63a0fb9b89..b558f0aa21 100644
--- a/scene/2d/skeleton_2d.cpp
+++ b/scene/2d/skeleton_2d.cpp
@@ -165,7 +165,7 @@ void Bone2D::_notification(int p_what) {
if (skeleton) {
for (int i = 0; i < skeleton->bones.size(); i++) {
if (skeleton->bones[i].bone == this) {
- skeleton->bones.remove(i);
+ skeleton->bones.remove_at(i);
break;
}
}
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp
index a8caebf088..084a5a520d 100644
--- a/scene/2d/tile_map.cpp
+++ b/scene/2d/tile_map.cpp
@@ -576,7 +576,7 @@ void TileMap::move_layer(int p_layer, int p_to_pos) {
TileMapLayer tl = layers[p_layer];
layers.insert(p_to_pos, tl);
- layers.remove(p_to_pos < p_layer ? p_layer + 1 : p_layer);
+ layers.remove_at(p_to_pos < p_layer ? p_layer + 1 : p_layer);
_recreate_internals();
notify_property_list_changed();
@@ -595,7 +595,7 @@ void TileMap::remove_layer(int p_layer) {
// Clear before removing the layer.
_clear_internals();
- layers.remove(p_layer);
+ layers.remove_at(p_layer);
_recreate_internals();
notify_property_list_changed();
diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp
index 34f748b197..efe23c6102 100644
--- a/scene/3d/audio_stream_player_3d.cpp
+++ b/scene/3d/audio_stream_player_3d.cpp
@@ -311,7 +311,7 @@ void AudioStreamPlayer3D::_notification(int p_what) {
while (stream_playbacks.size() > max_polyphony) {
AudioServer::get_singleton()->stop_playback_stream(stream_playbacks[0]);
- stream_playbacks.remove(0);
+ stream_playbacks.remove_at(0);
}
}
}
diff --git a/scene/3d/collision_object_3d.cpp b/scene/3d/collision_object_3d.cpp
index a166a05c71..085f1ade66 100644
--- a/scene/3d/collision_object_3d.cpp
+++ b/scene/3d/collision_object_3d.cpp
@@ -628,7 +628,7 @@ void CollisionObject3D::shape_owner_remove_shape(uint32_t p_owner, int p_shape)
--debug_shapes_count;
}
- shapes[p_owner].shapes.remove(p_shape);
+ shapes[p_owner].shapes.remove_at(p_shape);
for (KeyValue<uint32_t, ShapeData> &E : shapes) {
for (int i = 0; i < E.value.shapes.size(); i++) {
diff --git a/scene/3d/node_3d.cpp b/scene/3d/node_3d.cpp
index b7b88c7135..ddd9d2da8a 100644
--- a/scene/3d/node_3d.cpp
+++ b/scene/3d/node_3d.cpp
@@ -478,7 +478,7 @@ void Node3D::remove_gizmo(Ref<Node3DGizmo> p_gizmo) {
int idx = data.gizmos.find(p_gizmo);
if (idx != -1) {
p_gizmo->free();
- data.gizmos.remove(idx);
+ data.gizmos.remove_at(idx);
}
#endif
}
diff --git a/scene/3d/skeleton_3d.cpp b/scene/3d/skeleton_3d.cpp
index d4d3c0ebe1..04b5b88ef8 100644
--- a/scene/3d/skeleton_3d.cpp
+++ b/scene/3d/skeleton_3d.cpp
@@ -633,7 +633,7 @@ void Skeleton3D::remove_bone_child(int p_bone, int p_child) {
int child_idx = bones[p_bone].child_bones.find(p_child);
if (child_idx >= 0) {
- bones.write[p_bone].child_bones.remove(child_idx);
+ bones.write[p_bone].child_bones.remove_at(child_idx);
} else {
WARN_PRINT("Cannot remove child bone: Child bone not found.");
}
diff --git a/scene/3d/soft_dynamic_body_3d.cpp b/scene/3d/soft_dynamic_body_3d.cpp
index 903eedb58b..5546b88fb1 100644
--- a/scene/3d/soft_dynamic_body_3d.cpp
+++ b/scene/3d/soft_dynamic_body_3d.cpp
@@ -773,7 +773,7 @@ void SoftDynamicBody3D::_reset_points_offsets() {
void SoftDynamicBody3D::_remove_pinned_point(int p_point_index) {
const int id(_has_pinned_point(p_point_index));
if (-1 != id) {
- pinned_points.remove(id);
+ pinned_points.remove_at(id);
}
}
diff --git a/scene/animation/animation_blend_space_2d.cpp b/scene/animation/animation_blend_space_2d.cpp
index e621f06ce9..8b5203961f 100644
--- a/scene/animation/animation_blend_space_2d.cpp
+++ b/scene/animation/animation_blend_space_2d.cpp
@@ -134,7 +134,7 @@ void AnimationNodeBlendSpace2D::remove_blend_point(int p_point) {
}
}
if (erase) {
- triangles.remove(i);
+ triangles.remove_at(i);
i--;
}
@@ -224,7 +224,7 @@ int AnimationNodeBlendSpace2D::get_triangle_point(int p_triangle, int p_point) {
void AnimationNodeBlendSpace2D::remove_triangle(int p_triangle) {
ERR_FAIL_INDEX(p_triangle, triangles.size());
- triangles.remove(p_triangle);
+ triangles.remove_at(p_triangle);
}
int AnimationNodeBlendSpace2D::get_triangle_count() const {
diff --git a/scene/animation/animation_node_state_machine.cpp b/scene/animation/animation_node_state_machine.cpp
index b5d7a0555e..c8fa8bf395 100644
--- a/scene/animation/animation_node_state_machine.cpp
+++ b/scene/animation/animation_node_state_machine.cpp
@@ -464,7 +464,7 @@ double AnimationNodeStateMachinePlayback::process(AnimationNodeStateMachine *p_s
}
if (path.size()) { //if it came from path, remove path
- path.remove(0);
+ path.remove_at(0);
}
current = next;
if (switch_mode == AnimationNodeStateMachineTransition::SWITCH_MODE_SYNC) {
@@ -624,7 +624,7 @@ void AnimationNodeStateMachine::remove_node(const StringName &p_name) {
for (int i = 0; i < transitions.size(); i++) {
if (transitions[i].from == p_name || transitions[i].to == p_name) {
transitions.write[i].transition->disconnect("advance_condition_changed", callable_mp(this, &AnimationNodeStateMachine::_tree_changed));
- transitions.remove(i);
+ transitions.remove_at(i);
i--;
}
}
@@ -751,7 +751,7 @@ void AnimationNodeStateMachine::remove_transition(const StringName &p_from, cons
for (int i = 0; i < transitions.size(); i++) {
if (transitions[i].from == p_from && transitions[i].to == p_to) {
transitions.write[i].transition->disconnect("advance_condition_changed", callable_mp(this, &AnimationNodeStateMachine::_tree_changed));
- transitions.remove(i);
+ transitions.remove_at(i);
return;
}
}
@@ -764,7 +764,7 @@ void AnimationNodeStateMachine::remove_transition(const StringName &p_from, cons
void AnimationNodeStateMachine::remove_transition_by_index(int p_transition) {
ERR_FAIL_INDEX(p_transition, transitions.size());
transitions.write[p_transition].transition->disconnect("advance_condition_changed", callable_mp(this, &AnimationNodeStateMachine::_tree_changed));
- transitions.remove(p_transition);
+ transitions.remove_at(p_transition);
/*if (playing) {
path.clear();
}*/
diff --git a/scene/animation/animation_tree.cpp b/scene/animation/animation_tree.cpp
index 37e754148c..57c615a6ab 100644
--- a/scene/animation/animation_tree.cpp
+++ b/scene/animation/animation_tree.cpp
@@ -329,7 +329,7 @@ void AnimationNode::set_input_name(int p_input, const String &p_name) {
void AnimationNode::remove_input(int p_index) {
ERR_FAIL_INDEX(p_index, inputs.size());
- inputs.remove(p_index);
+ inputs.remove_at(p_index);
emit_changed();
}
diff --git a/scene/audio/audio_stream_player.cpp b/scene/audio/audio_stream_player.cpp
index 43c4ce4c82..3da4f23a08 100644
--- a/scene/audio/audio_stream_player.cpp
+++ b/scene/audio/audio_stream_player.cpp
@@ -143,7 +143,7 @@ void AudioStreamPlayer::play(float p_from_pos) {
set_process_internal(true);
while (stream_playbacks.size() > max_polyphony) {
AudioServer::get_singleton()->stop_playback_stream(stream_playbacks[0]);
- stream_playbacks.remove(0);
+ stream_playbacks.remove_at(0);
}
}
diff --git a/scene/gui/code_edit.cpp b/scene/gui/code_edit.cpp
index 7fba94da4c..57de75a71d 100644
--- a/scene/gui/code_edit.cpp
+++ b/scene/gui/code_edit.cpp
@@ -2395,7 +2395,7 @@ void CodeEdit::_update_delimiter_cache(int p_from_line, int p_to_line) {
if (start_line != end_line) {
if (p_to_line < p_from_line) {
for (int i = end_line; i > start_line; i--) {
- delimiter_cache.remove(i);
+ delimiter_cache.remove_at(i);
}
} else {
for (int i = start_line; i < end_line; i++) {
@@ -2632,7 +2632,7 @@ void CodeEdit::_remove_delimiter(const String &p_start_key, DelimiterType p_type
break;
}
- delimiters.remove(i);
+ delimiters.remove_at(i);
if (!setting_delimiters) {
delimiter_cache.clear();
_update_delimiter_cache();
@@ -2673,7 +2673,7 @@ void CodeEdit::_set_delimiters(const TypedArray<String> &p_delimiters, Delimiter
void CodeEdit::_clear_delimiters(DelimiterType p_type) {
for (int i = delimiters.size() - 1; i >= 0; i--) {
if (delimiters[i].type == p_type) {
- delimiters.remove(i);
+ delimiters.remove_at(i);
}
}
delimiter_cache.clear();
diff --git a/scene/gui/gradient_edit.cpp b/scene/gui/gradient_edit.cpp
index ae15b021a5..1210be15ce 100644
--- a/scene/gui/gradient_edit.cpp
+++ b/scene/gui/gradient_edit.cpp
@@ -89,7 +89,7 @@ void GradientEdit::gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventKey> k = p_event;
if (k.is_valid() && k->is_pressed() && k->get_keycode() == Key::KEY_DELETE && grabbed != -1) {
- points.remove(grabbed);
+ points.remove_at(grabbed);
grabbed = -1;
grabbing = false;
update();
@@ -109,7 +109,7 @@ void GradientEdit::gui_input(const Ref<InputEvent> &p_event) {
if (mb.is_valid() && mb->get_button_index() == MouseButton::RIGHT && mb->is_pressed()) {
grabbed = _get_point_from_pos(mb->get_position().x);
if (grabbed != -1) {
- points.remove(grabbed);
+ points.remove_at(grabbed);
grabbed = -1;
grabbing = false;
update();
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index c0f2cdbef1..408ef53e89 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -381,7 +381,7 @@ void ItemList::move_item(int p_from_idx, int p_to_idx) {
}
Item item = items[p_from_idx];
- items.remove(p_from_idx);
+ items.remove_at(p_from_idx);
items.insert(p_to_idx, item);
update();
@@ -404,7 +404,7 @@ int ItemList::get_item_count() const {
void ItemList::remove_item(int p_idx) {
ERR_FAIL_INDEX(p_idx, items.size());
- items.remove(p_idx);
+ items.remove_at(p_idx);
if (current == p_idx) {
current = -1;
}
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp
index 7e9b545776..2e854abb76 100644
--- a/scene/gui/popup_menu.cpp
+++ b/scene/gui/popup_menu.cpp
@@ -1403,7 +1403,7 @@ void PopupMenu::remove_item(int p_idx) {
_unref_shortcut(items[p_idx].shortcut);
}
- items.remove(p_idx);
+ items.remove_at(p_idx);
control->update();
child_controls_changed();
}
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index f191dfecb4..fd19fad667 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -2334,7 +2334,7 @@ void RichTextLabel::_remove_item(Item *p_item, const int p_line, const int p_sub
p_item->parent->subitems.erase(p_item);
// If a newline was erased, all lines AFTER the newline need to be decremented.
if (p_item->type == ITEM_NEWLINE) {
- current_frame->lines.remove(p_line);
+ current_frame->lines.remove_at(p_line);
for (int i = 0; i < current->subitems.size(); i++) {
if (current->subitems[i]->line > p_subitem_line) {
current->subitems[i]->line--;
@@ -2423,7 +2423,7 @@ bool RichTextLabel::remove_line(const int p_line) {
}
if (!had_newline) {
- current_frame->lines.remove(p_line);
+ current_frame->lines.remove_at(p_line);
if (current_frame->lines.size() == 0) {
current_frame->lines.resize(1);
}
@@ -3527,7 +3527,7 @@ void RichTextLabel::append_text(const String &p_bbcode) {
pos = brk_pos + 1;
} else {
String identifier = expr[0];
- expr.remove(0);
+ expr.remove_at(0);
Dictionary properties = parse_expressions_for_values(expr);
Ref<RichTextEffect> effect = _get_custom_effect_by_code(identifier);
diff --git a/scene/gui/tab_bar.cpp b/scene/gui/tab_bar.cpp
index 1dda29f668..57ee7fd494 100644
--- a/scene/gui/tab_bar.cpp
+++ b/scene/gui/tab_bar.cpp
@@ -790,7 +790,7 @@ void TabBar::clear_tabs() {
void TabBar::remove_tab(int p_idx) {
ERR_FAIL_INDEX(p_idx, tabs.size());
- tabs.remove(p_idx);
+ tabs.remove_at(p_idx);
if (current >= p_idx) {
current--;
}
@@ -961,7 +961,7 @@ void TabBar::move_tab(int from, int to) {
ERR_FAIL_INDEX(to, tabs.size());
Tab tab_from = tabs[from];
- tabs.remove(from);
+ tabs.remove_at(from);
tabs.insert(to, tab_from);
_update_cache();
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index c8f6ecdafd..2cb9d10fca 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -300,11 +300,11 @@ void TextEdit::Text::insert(int p_at, const String &p_text, const Array &p_bidi_
invalidate_cache(p_at);
}
-void TextEdit::Text::remove(int p_at) {
- int height = text[p_at].height;
- int width = text[p_at].width;
+void TextEdit::Text::remove_at(int p_index) {
+ int height = text[p_index].height;
+ int width = text[p_index].width;
- text.remove(p_at);
+ text.remove_at(p_index);
// If this is the tallest line, we need to get the next tallest.
if (height == line_height) {
@@ -330,7 +330,7 @@ void TextEdit::Text::add_gutter(int p_at) {
void TextEdit::Text::remove_gutter(int p_gutter) {
for (int i = 0; i < text.size(); i++) {
- text.write[i].gutters.remove(p_gutter);
+ text.write[i].gutters.remove_at(p_gutter);
}
gutter_count--;
}
@@ -4347,7 +4347,7 @@ void TextEdit::add_gutter(int p_at) {
void TextEdit::remove_gutter(int p_gutter) {
ERR_FAIL_INDEX(p_gutter, gutters.size());
- gutters.remove(p_gutter);
+ gutters.remove_at(p_gutter);
for (int i = 0; i < text.size() + 1; i++) {
text.remove_gutter(p_gutter);
@@ -6249,7 +6249,7 @@ void TextEdit::_base_remove_text(int p_from_line, int p_from_column, int p_to_li
String post_text = text[p_to_line].substr(p_to_column, text[p_to_line].length());
for (int i = p_from_line; i < p_to_line; i++) {
- text.remove(p_from_line + 1);
+ text.remove_at(p_from_line + 1);
}
text.set(p_from_line, pre_text + post_text, structured_text_parser(st_parser, st_args, pre_text + post_text));
diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h
index b13adb8519..42b21cbe9c 100644
--- a/scene/gui/text_edit.h
+++ b/scene/gui/text_edit.h
@@ -205,7 +205,7 @@ private:
}
bool is_hidden(int p_line) const { return text[p_line].hidden; }
void insert(int p_at, const String &p_text, const Array &p_bidi_override);
- void remove(int p_at);
+ void remove_at(int p_index);
int size() const { return text.size(); }
void clear();
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index 27e617bdd0..89caaaafd0 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -848,7 +848,7 @@ String TreeItem::get_button_tooltip(int p_column, int p_idx) const {
void TreeItem::erase_button(int p_column, int p_idx) {
ERR_FAIL_INDEX(p_column, cells.size());
ERR_FAIL_INDEX(p_idx, cells[p_column].buttons.size());
- cells.write[p_column].buttons.remove(p_idx);
+ cells.write[p_column].buttons.remove_at(p_idx);
_changed_notify(p_column);
}
diff --git a/scene/gui/tree.h b/scene/gui/tree.h
index 2e4e1bd364..d4caec614a 100644
--- a/scene/gui/tree.h
+++ b/scene/gui/tree.h
@@ -171,7 +171,7 @@ private:
}
if (parent) {
if (!parent->children_cache.is_empty()) {
- parent->children_cache.remove(get_index());
+ parent->children_cache.remove_at(get_index());
}
if (parent->first_child == this) {
parent->first_child = next;
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 44420fcc31..5e004d6863 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -332,7 +332,7 @@ void Node::_move_child(Node *p_child, int p_pos, bool p_ignore_end) {
int motion_from = MIN(p_pos, p_child->data.pos);
int motion_to = MAX(p_pos, p_child->data.pos);
- data.children.remove(p_child->data.pos);
+ data.children.remove_at(p_child->data.pos);
data.children.insert(p_pos, p_child);
if (data.tree) {
@@ -1208,7 +1208,7 @@ void Node::remove_child(Node *p_child) {
remove_child_notify(p_child);
p_child->notification(NOTIFICATION_UNPARENTED);
- data.children.remove(idx);
+ data.children.remove_at(idx);
//update pointer and size
child_count = data.children.size();
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 48a672b310..5404b173d5 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -290,7 +290,7 @@ void Viewport::_sub_window_grab_focus(Window *p_window) {
if (p_window->get_flag(Window::FLAG_NO_FOCUS)) {
// Can only move to foreground, but no focus granted.
SubWindow sw = gui.sub_windows[index];
- gui.sub_windows.remove(index);
+ gui.sub_windows.remove_at(index);
gui.sub_windows.push_back(sw);
index = gui.sub_windows.size() - 1;
_sub_window_update_order();
@@ -318,7 +318,7 @@ void Viewport::_sub_window_grab_focus(Window *p_window) {
{ // Move to foreground.
SubWindow sw = gui.sub_windows[index];
- gui.sub_windows.remove(index);
+ gui.sub_windows.remove_at(index);
gui.sub_windows.push_back(sw);
index = gui.sub_windows.size() - 1;
_sub_window_update_order();
@@ -335,7 +335,7 @@ void Viewport::_sub_window_remove(Window *p_window) {
for (int i = 0; i < gui.sub_windows.size(); i++) {
if (gui.sub_windows[i].window == p_window) {
RS::get_singleton()->free(gui.sub_windows[i].canvas_item);
- gui.sub_windows.remove(i);
+ gui.sub_windows.remove_at(i);
break;
}
}
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp
index d31771e71a..e3cf9183a0 100644
--- a/scene/resources/animation.cpp
+++ b/scene/resources/animation.cpp
@@ -930,7 +930,7 @@ void Animation::remove_track(int p_track) {
}
memdelete(t);
- tracks.remove(p_track);
+ tracks.remove_at(p_track);
emit_changed();
emit_signal(SceneStringNames::get_singleton()->tracks_changed);
}
@@ -1320,7 +1320,7 @@ void Animation::track_remove_key(int p_track, int p_idx) {
ERR_FAIL_COND(tt->compressed_track >= 0);
ERR_FAIL_INDEX(p_idx, tt->positions.size());
- tt->positions.remove(p_idx);
+ tt->positions.remove_at(p_idx);
} break;
case TYPE_ROTATION_3D: {
@@ -1329,7 +1329,7 @@ void Animation::track_remove_key(int p_track, int p_idx) {
ERR_FAIL_COND(rt->compressed_track >= 0);
ERR_FAIL_INDEX(p_idx, rt->rotations.size());
- rt->rotations.remove(p_idx);
+ rt->rotations.remove_at(p_idx);
} break;
case TYPE_SCALE_3D: {
@@ -1338,7 +1338,7 @@ void Animation::track_remove_key(int p_track, int p_idx) {
ERR_FAIL_COND(st->compressed_track >= 0);
ERR_FAIL_INDEX(p_idx, st->scales.size());
- st->scales.remove(p_idx);
+ st->scales.remove_at(p_idx);
} break;
case TYPE_BLEND_SHAPE: {
@@ -1347,37 +1347,37 @@ void Animation::track_remove_key(int p_track, int p_idx) {
ERR_FAIL_COND(bst->compressed_track >= 0);
ERR_FAIL_INDEX(p_idx, bst->blend_shapes.size());
- bst->blend_shapes.remove(p_idx);
+ bst->blend_shapes.remove_at(p_idx);
} break;
case TYPE_VALUE: {
ValueTrack *vt = static_cast<ValueTrack *>(t);
ERR_FAIL_INDEX(p_idx, vt->values.size());
- vt->values.remove(p_idx);
+ vt->values.remove_at(p_idx);
} break;
case TYPE_METHOD: {
MethodTrack *mt = static_cast<MethodTrack *>(t);
ERR_FAIL_INDEX(p_idx, mt->methods.size());
- mt->methods.remove(p_idx);
+ mt->methods.remove_at(p_idx);
} break;
case TYPE_BEZIER: {
BezierTrack *bz = static_cast<BezierTrack *>(t);
ERR_FAIL_INDEX(p_idx, bz->values.size());
- bz->values.remove(p_idx);
+ bz->values.remove_at(p_idx);
} break;
case TYPE_AUDIO: {
AudioTrack *ad = static_cast<AudioTrack *>(t);
ERR_FAIL_INDEX(p_idx, ad->values.size());
- ad->values.remove(p_idx);
+ ad->values.remove_at(p_idx);
} break;
case TYPE_ANIMATION: {
AnimationTrack *an = static_cast<AnimationTrack *>(t);
ERR_FAIL_INDEX(p_idx, an->values.size());
- an->values.remove(p_idx);
+ an->values.remove_at(p_idx);
} break;
}
@@ -1905,7 +1905,7 @@ void Animation::track_set_key_time(int p_track, int p_key_idx, double p_time) {
ERR_FAIL_INDEX(p_key_idx, tt->positions.size());
TKey<Vector3> key = tt->positions[p_key_idx];
key.time = p_time;
- tt->positions.remove(p_key_idx);
+ tt->positions.remove_at(p_key_idx);
_insert(p_time, tt->positions, key);
return;
}
@@ -1915,7 +1915,7 @@ void Animation::track_set_key_time(int p_track, int p_key_idx, double p_time) {
ERR_FAIL_INDEX(p_key_idx, tt->rotations.size());
TKey<Quaternion> key = tt->rotations[p_key_idx];
key.time = p_time;
- tt->rotations.remove(p_key_idx);
+ tt->rotations.remove_at(p_key_idx);
_insert(p_time, tt->rotations, key);
return;
}
@@ -1925,7 +1925,7 @@ void Animation::track_set_key_time(int p_track, int p_key_idx, double p_time) {
ERR_FAIL_INDEX(p_key_idx, tt->scales.size());
TKey<Vector3> key = tt->scales[p_key_idx];
key.time = p_time;
- tt->scales.remove(p_key_idx);
+ tt->scales.remove_at(p_key_idx);
_insert(p_time, tt->scales, key);
return;
}
@@ -1935,7 +1935,7 @@ void Animation::track_set_key_time(int p_track, int p_key_idx, double p_time) {
ERR_FAIL_INDEX(p_key_idx, tt->blend_shapes.size());
TKey<float> key = tt->blend_shapes[p_key_idx];
key.time = p_time;
- tt->blend_shapes.remove(p_key_idx);
+ tt->blend_shapes.remove_at(p_key_idx);
_insert(p_time, tt->blend_shapes, key);
return;
}
@@ -1944,7 +1944,7 @@ void Animation::track_set_key_time(int p_track, int p_key_idx, double p_time) {
ERR_FAIL_INDEX(p_key_idx, vt->values.size());
TKey<Variant> key = vt->values[p_key_idx];
key.time = p_time;
- vt->values.remove(p_key_idx);
+ vt->values.remove_at(p_key_idx);
_insert(p_time, vt->values, key);
return;
}
@@ -1953,7 +1953,7 @@ void Animation::track_set_key_time(int p_track, int p_key_idx, double p_time) {
ERR_FAIL_INDEX(p_key_idx, mt->methods.size());
MethodKey key = mt->methods[p_key_idx];
key.time = p_time;
- mt->methods.remove(p_key_idx);
+ mt->methods.remove_at(p_key_idx);
_insert(p_time, mt->methods, key);
return;
}
@@ -1962,7 +1962,7 @@ void Animation::track_set_key_time(int p_track, int p_key_idx, double p_time) {
ERR_FAIL_INDEX(p_key_idx, bt->values.size());
TKey<BezierKey> key = bt->values[p_key_idx];
key.time = p_time;
- bt->values.remove(p_key_idx);
+ bt->values.remove_at(p_key_idx);
_insert(p_time, bt->values, key);
return;
}
@@ -1971,7 +1971,7 @@ void Animation::track_set_key_time(int p_track, int p_key_idx, double p_time) {
ERR_FAIL_INDEX(p_key_idx, at->values.size());
TKey<AudioKey> key = at->values[p_key_idx];
key.time = p_time;
- at->values.remove(p_key_idx);
+ at->values.remove_at(p_key_idx);
_insert(p_time, at->values, key);
return;
}
@@ -1980,7 +1980,7 @@ void Animation::track_set_key_time(int p_track, int p_key_idx, double p_time) {
ERR_FAIL_INDEX(p_key_idx, at->values.size());
TKey<StringName> key = at->values[p_key_idx];
key.time = p_time;
- at->values.remove(p_key_idx);
+ at->values.remove_at(p_key_idx);
_insert(p_time, at->values, key);
return;
}
@@ -3679,7 +3679,7 @@ void Animation::track_move_to(int p_track, int p_to_index) {
}
Track *track = tracks.get(p_track);
- tracks.remove(p_track);
+ tracks.remove_at(p_track);
// Take into account that the position of the tracks that come after the one removed will change.
tracks.insert(p_to_index > p_track ? p_to_index - 1 : p_to_index, track);
@@ -4058,7 +4058,7 @@ void Animation::_position_track_optimize(int p_idx, real_t p_allowed_linear_err,
prev_erased = true;
}
- tt->positions.remove(i);
+ tt->positions.remove_at(i);
i--;
} else {
@@ -4093,7 +4093,7 @@ void Animation::_rotation_track_optimize(int p_idx, real_t p_allowed_angular_err
prev_erased = true;
}
- tt->rotations.remove(i);
+ tt->rotations.remove_at(i);
i--;
} else {
@@ -4127,7 +4127,7 @@ void Animation::_scale_track_optimize(int p_idx, real_t p_allowed_linear_err) {
prev_erased = true;
}
- tt->scales.remove(i);
+ tt->scales.remove_at(i);
i--;
} else {
@@ -4162,7 +4162,7 @@ void Animation::_blend_shape_track_optimize(int p_idx, real_t p_allowed_linear_e
prev_erased = true;
}
- tt->blend_shapes.remove(i);
+ tt->blend_shapes.remove_at(i);
i--;
} else {
diff --git a/scene/resources/curve.cpp b/scene/resources/curve.cpp
index b530a72033..b87639de6a 100644
--- a/scene/resources/curve.cpp
+++ b/scene/resources/curve.cpp
@@ -136,7 +136,7 @@ void Curve::clean_dupes() {
for (int i = 1; i < _points.size(); ++i) {
real_t diff = _points[i - 1].pos.x - _points[i].pos.x;
if (diff <= CMP_EPSILON) {
- _points.remove(i);
+ _points.remove_at(i);
--i;
dirty = true;
}
@@ -207,7 +207,7 @@ Curve::TangentMode Curve::get_point_right_mode(int i) const {
void Curve::remove_point(int p_index) {
ERR_FAIL_INDEX(p_index, _points.size());
- _points.remove(p_index);
+ _points.remove_at(p_index);
mark_dirty();
}
@@ -591,7 +591,7 @@ Vector2 Curve2D::get_point_out(int p_index) const {
void Curve2D::remove_point(int p_index) {
ERR_FAIL_INDEX(p_index, points.size());
- points.remove(p_index);
+ points.remove_at(p_index);
baked_cache_dirty = true;
emit_signal(CoreStringNames::get_singleton()->changed);
}
@@ -1095,7 +1095,7 @@ Vector3 Curve3D::get_point_out(int p_index) const {
void Curve3D::remove_point(int p_index) {
ERR_FAIL_INDEX(p_index, points.size());
- points.remove(p_index);
+ points.remove_at(p_index);
baked_cache_dirty = true;
emit_signal(CoreStringNames::get_singleton()->changed);
}
diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp
index 6cd42e1456..d88a2c557b 100644
--- a/scene/resources/font.cpp
+++ b/scene/resources/font.cpp
@@ -752,7 +752,7 @@ void FontData::remove_cache(int p_cache_index) {
if (cache[p_cache_index].is_valid()) {
TS->free(cache.write[p_cache_index]);
}
- cache.remove(p_cache_index);
+ cache.remove_at(p_cache_index);
emit_changed();
}
@@ -1356,8 +1356,8 @@ void Font::remove_data(int p_idx) {
data.write[p_idx]->disconnect(SNAME("changed"), callable_mp(this, &Font::_data_changed));
}
- data.remove(p_idx);
- rids.remove(p_idx);
+ data.remove_at(p_idx);
+ rids.remove_at(p_idx);
cache.clear();
cache_wrap.clear();
diff --git a/scene/resources/gradient.cpp b/scene/resources/gradient.cpp
index 4559b4ce0a..95ec141df6 100644
--- a/scene/resources/gradient.cpp
+++ b/scene/resources/gradient.cpp
@@ -144,7 +144,7 @@ void Gradient::add_point(float p_offset, const Color &p_color) {
void Gradient::remove_point(int p_index) {
ERR_FAIL_INDEX(p_index, points.size());
ERR_FAIL_COND(points.size() <= 1);
- points.remove(p_index);
+ points.remove_at(p_index);
emit_signal(CoreStringNames::get_singleton()->changed);
}
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index 3f4765d20f..c39f59d535 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -62,7 +62,7 @@ static Array _sanitize_node_pinned_properties(Node *p_node) {
if (storable_properties.has(pinned[i])) {
i++;
} else {
- pinned.remove(i);
+ pinned.remove_at(i);
}
} while (i < pinned.size());
if (pinned.is_empty()) {
diff --git a/scene/resources/skeleton_modification_stack_2d.cpp b/scene/resources/skeleton_modification_stack_2d.cpp
index 25c3e9d2ef..e596390f78 100644
--- a/scene/resources/skeleton_modification_stack_2d.cpp
+++ b/scene/resources/skeleton_modification_stack_2d.cpp
@@ -172,7 +172,7 @@ void SkeletonModificationStack2D::add_modification(Ref<SkeletonModification2D> p
void SkeletonModificationStack2D::delete_modification(int p_mod_idx) {
ERR_FAIL_INDEX(p_mod_idx, modifications.size());
- modifications.remove(p_mod_idx);
+ modifications.remove_at(p_mod_idx);
#ifdef TOOLS_ENABLED
set_editor_gizmos_dirty(true);
diff --git a/scene/resources/skeleton_modification_stack_3d.cpp b/scene/resources/skeleton_modification_stack_3d.cpp
index 301811f0b6..e5b7771251 100644
--- a/scene/resources/skeleton_modification_stack_3d.cpp
+++ b/scene/resources/skeleton_modification_stack_3d.cpp
@@ -133,7 +133,7 @@ void SkeletonModificationStack3D::add_modification(Ref<SkeletonModification3D> p
void SkeletonModificationStack3D::delete_modification(int p_mod_idx) {
const int modifications_size = modifications.size();
ERR_FAIL_INDEX(p_mod_idx, modifications_size);
- modifications.remove(p_mod_idx);
+ modifications.remove_at(p_mod_idx);
}
void SkeletonModificationStack3D::set_modification(int p_mod_idx, Ref<SkeletonModification3D> p_mod) {
@@ -141,7 +141,7 @@ void SkeletonModificationStack3D::set_modification(int p_mod_idx, Ref<SkeletonMo
ERR_FAIL_INDEX(p_mod_idx, modifications_size);
if (p_mod == nullptr) {
- modifications.remove(p_mod_idx);
+ modifications.remove_at(p_mod_idx);
} else {
p_mod->_setup_modification(this);
modifications[p_mod_idx] = p_mod;
diff --git a/scene/resources/sprite_frames.cpp b/scene/resources/sprite_frames.cpp
index 5524d59dc7..71ed96cf15 100644
--- a/scene/resources/sprite_frames.cpp
+++ b/scene/resources/sprite_frames.cpp
@@ -56,7 +56,7 @@ void SpriteFrames::remove_frame(const StringName &p_anim, int p_idx) {
Map<StringName, Anim>::Element *E = animations.find(p_anim);
ERR_FAIL_COND_MSG(!E, "Animation '" + String(p_anim) + "' doesn't exist.");
- E->get().frames.remove(p_idx);
+ E->get().frames.remove_at(p_idx);
emit_changed();
}
diff --git a/scene/resources/syntax_highlighter.cpp b/scene/resources/syntax_highlighter.cpp
index 52a3abf74d..cfb5ac2ca6 100644
--- a/scene/resources/syntax_highlighter.cpp
+++ b/scene/resources/syntax_highlighter.cpp
@@ -501,7 +501,7 @@ void CodeHighlighter::add_color_region(const String &p_start_key, const String &
void CodeHighlighter::remove_color_region(const String &p_start_key) {
for (int i = 0; i < color_regions.size(); i++) {
if (color_regions[i].start_key == p_start_key) {
- color_regions.remove(i);
+ color_regions.remove_at(i);
break;
}
}
diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp
index 8c92445338..34fe7c0b87 100644
--- a/scene/resources/tile_set.cpp
+++ b/scene/resources/tile_set.cpp
@@ -560,7 +560,7 @@ void TileSet::move_occlusion_layer(int p_from_index, int p_to_pos) {
ERR_FAIL_INDEX(p_from_index, occlusion_layers.size());
ERR_FAIL_INDEX(p_to_pos, occlusion_layers.size() + 1);
occlusion_layers.insert(p_to_pos, occlusion_layers[p_from_index]);
- occlusion_layers.remove(p_to_pos < p_from_index ? p_from_index + 1 : p_from_index);
+ occlusion_layers.remove_at(p_to_pos < p_from_index ? p_from_index + 1 : p_from_index);
for (KeyValue<int, Ref<TileSetSource>> source : sources) {
source.value->move_occlusion_layer(p_from_index, p_to_pos);
}
@@ -570,7 +570,7 @@ void TileSet::move_occlusion_layer(int p_from_index, int p_to_pos) {
void TileSet::remove_occlusion_layer(int p_index) {
ERR_FAIL_INDEX(p_index, occlusion_layers.size());
- occlusion_layers.remove(p_index);
+ occlusion_layers.remove_at(p_index);
for (KeyValue<int, Ref<TileSetSource>> source : sources) {
source.value->remove_occlusion_layer(p_index);
}
@@ -623,7 +623,7 @@ void TileSet::move_physics_layer(int p_from_index, int p_to_pos) {
ERR_FAIL_INDEX(p_from_index, physics_layers.size());
ERR_FAIL_INDEX(p_to_pos, physics_layers.size() + 1);
physics_layers.insert(p_to_pos, physics_layers[p_from_index]);
- physics_layers.remove(p_to_pos < p_from_index ? p_from_index + 1 : p_from_index);
+ physics_layers.remove_at(p_to_pos < p_from_index ? p_from_index + 1 : p_from_index);
for (KeyValue<int, Ref<TileSetSource>> source : sources) {
source.value->move_physics_layer(p_from_index, p_to_pos);
}
@@ -633,7 +633,7 @@ void TileSet::move_physics_layer(int p_from_index, int p_to_pos) {
void TileSet::remove_physics_layer(int p_index) {
ERR_FAIL_INDEX(p_index, physics_layers.size());
- physics_layers.remove(p_index);
+ physics_layers.remove_at(p_index);
for (KeyValue<int, Ref<TileSetSource>> source : sources) {
source.value->remove_physics_layer(p_index);
}
@@ -698,7 +698,7 @@ void TileSet::move_terrain_set(int p_from_index, int p_to_pos) {
ERR_FAIL_INDEX(p_from_index, terrain_sets.size());
ERR_FAIL_INDEX(p_to_pos, terrain_sets.size() + 1);
terrain_sets.insert(p_to_pos, terrain_sets[p_from_index]);
- terrain_sets.remove(p_to_pos < p_from_index ? p_from_index + 1 : p_from_index);
+ terrain_sets.remove_at(p_to_pos < p_from_index ? p_from_index + 1 : p_from_index);
for (KeyValue<int, Ref<TileSetSource>> source : sources) {
source.value->move_terrain_set(p_from_index, p_to_pos);
}
@@ -709,7 +709,7 @@ void TileSet::move_terrain_set(int p_from_index, int p_to_pos) {
void TileSet::remove_terrain_set(int p_index) {
ERR_FAIL_INDEX(p_index, terrain_sets.size());
- terrain_sets.remove(p_index);
+ terrain_sets.remove_at(p_index);
for (KeyValue<int, Ref<TileSetSource>> source : sources) {
source.value->remove_terrain_set(p_index);
}
@@ -772,7 +772,7 @@ void TileSet::move_terrain(int p_terrain_set, int p_from_index, int p_to_pos) {
ERR_FAIL_INDEX(p_from_index, terrains.size());
ERR_FAIL_INDEX(p_to_pos, terrains.size() + 1);
terrains.insert(p_to_pos, terrains[p_from_index]);
- terrains.remove(p_to_pos < p_from_index ? p_from_index + 1 : p_from_index);
+ terrains.remove_at(p_to_pos < p_from_index ? p_from_index + 1 : p_from_index);
for (KeyValue<int, Ref<TileSetSource>> source : sources) {
source.value->move_terrain(p_terrain_set, p_from_index, p_to_pos);
}
@@ -786,7 +786,7 @@ void TileSet::remove_terrain(int p_terrain_set, int p_index) {
Vector<Terrain> &terrains = terrain_sets.write[p_terrain_set].terrains;
ERR_FAIL_INDEX(p_index, terrains.size());
- terrains.remove(p_index);
+ terrains.remove_at(p_index);
for (KeyValue<int, Ref<TileSetSource>> source : sources) {
source.value->remove_terrain(p_terrain_set, p_index);
}
@@ -941,7 +941,7 @@ void TileSet::move_navigation_layer(int p_from_index, int p_to_pos) {
ERR_FAIL_INDEX(p_from_index, navigation_layers.size());
ERR_FAIL_INDEX(p_to_pos, navigation_layers.size() + 1);
navigation_layers.insert(p_to_pos, navigation_layers[p_from_index]);
- navigation_layers.remove(p_to_pos < p_from_index ? p_from_index + 1 : p_from_index);
+ navigation_layers.remove_at(p_to_pos < p_from_index ? p_from_index + 1 : p_from_index);
for (KeyValue<int, Ref<TileSetSource>> source : sources) {
source.value->move_navigation_layer(p_from_index, p_to_pos);
}
@@ -951,7 +951,7 @@ void TileSet::move_navigation_layer(int p_from_index, int p_to_pos) {
void TileSet::remove_navigation_layer(int p_index) {
ERR_FAIL_INDEX(p_index, navigation_layers.size());
- navigation_layers.remove(p_index);
+ navigation_layers.remove_at(p_index);
for (KeyValue<int, Ref<TileSetSource>> source : sources) {
source.value->remove_navigation_layer(p_index);
}
@@ -994,7 +994,7 @@ void TileSet::move_custom_data_layer(int p_from_index, int p_to_pos) {
ERR_FAIL_INDEX(p_from_index, custom_data_layers.size());
ERR_FAIL_INDEX(p_to_pos, custom_data_layers.size() + 1);
custom_data_layers.insert(p_to_pos, custom_data_layers[p_from_index]);
- custom_data_layers.remove(p_to_pos < p_from_index ? p_from_index + 1 : p_from_index);
+ custom_data_layers.remove_at(p_to_pos < p_from_index ? p_from_index + 1 : p_from_index);
for (KeyValue<int, Ref<TileSetSource>> source : sources) {
source.value->move_custom_data_layer(p_from_index, p_to_pos);
}
@@ -1004,7 +1004,7 @@ void TileSet::move_custom_data_layer(int p_from_index, int p_to_pos) {
void TileSet::remove_custom_data_layer(int p_index) {
ERR_FAIL_INDEX(p_index, custom_data_layers.size());
- custom_data_layers.remove(p_index);
+ custom_data_layers.remove_at(p_index);
for (KeyValue<String, int> E : custom_data_layers_by_name) {
if (E.value == p_index) {
custom_data_layers_by_name.erase(E.key);
@@ -1340,7 +1340,7 @@ Ref<TileMapPattern> TileSet::get_pattern(int p_index) {
void TileSet::remove_pattern(int p_index) {
ERR_FAIL_INDEX(p_index, (int)patterns.size());
- patterns.remove(p_index);
+ patterns.remove_at(p_index);
emit_changed();
}
@@ -4707,12 +4707,12 @@ void TileData::move_occlusion_layer(int p_from_index, int p_to_pos) {
ERR_FAIL_INDEX(p_from_index, occluders.size());
ERR_FAIL_INDEX(p_to_pos, occluders.size() + 1);
occluders.insert(p_to_pos, occluders[p_from_index]);
- occluders.remove(p_to_pos < p_from_index ? p_from_index + 1 : p_from_index);
+ occluders.remove_at(p_to_pos < p_from_index ? p_from_index + 1 : p_from_index);
}
void TileData::remove_occlusion_layer(int p_index) {
ERR_FAIL_INDEX(p_index, occluders.size());
- occluders.remove(p_index);
+ occluders.remove_at(p_index);
}
void TileData::add_physics_layer(int p_to_pos) {
@@ -4727,12 +4727,12 @@ void TileData::move_physics_layer(int p_from_index, int p_to_pos) {
ERR_FAIL_INDEX(p_from_index, physics.size());
ERR_FAIL_INDEX(p_to_pos, physics.size() + 1);
physics.insert(p_to_pos, physics[p_from_index]);
- physics.remove(p_to_pos < p_from_index ? p_from_index + 1 : p_from_index);
+ physics.remove_at(p_to_pos < p_from_index ? p_from_index + 1 : p_from_index);
}
void TileData::remove_physics_layer(int p_index) {
ERR_FAIL_INDEX(p_index, physics.size());
- physics.remove(p_index);
+ physics.remove_at(p_index);
}
void TileData::add_terrain_set(int p_to_pos) {
@@ -4816,12 +4816,12 @@ void TileData::move_navigation_layer(int p_from_index, int p_to_pos) {
ERR_FAIL_INDEX(p_from_index, navigation.size());
ERR_FAIL_INDEX(p_to_pos, navigation.size() + 1);
navigation.insert(p_to_pos, navigation[p_from_index]);
- navigation.remove(p_to_pos < p_from_index ? p_from_index + 1 : p_from_index);
+ navigation.remove_at(p_to_pos < p_from_index ? p_from_index + 1 : p_from_index);
}
void TileData::remove_navigation_layer(int p_index) {
ERR_FAIL_INDEX(p_index, navigation.size());
- navigation.remove(p_index);
+ navigation.remove_at(p_index);
}
void TileData::add_custom_data_layer(int p_to_pos) {
@@ -4836,12 +4836,12 @@ void TileData::move_custom_data_layer(int p_from_index, int p_to_pos) {
ERR_FAIL_INDEX(p_from_index, custom_data.size());
ERR_FAIL_INDEX(p_to_pos, custom_data.size() + 1);
custom_data.insert(p_to_pos, navigation[p_from_index]);
- custom_data.remove(p_to_pos < p_from_index ? p_from_index + 1 : p_from_index);
+ custom_data.remove_at(p_to_pos < p_from_index ? p_from_index + 1 : p_from_index);
}
void TileData::remove_custom_data_layer(int p_index) {
ERR_FAIL_INDEX(p_index, custom_data.size());
- custom_data.remove(p_index);
+ custom_data.remove_at(p_index);
}
void TileData::reset_state() {
@@ -5019,7 +5019,7 @@ void TileData::add_collision_polygon(int p_layer_id) {
void TileData::remove_collision_polygon(int p_layer_id, int p_polygon_index) {
ERR_FAIL_INDEX(p_layer_id, physics.size());
ERR_FAIL_INDEX(p_polygon_index, physics[p_layer_id].polygons.size());
- physics.write[p_layer_id].polygons.remove(p_polygon_index);
+ physics.write[p_layer_id].polygons.remove_at(p_polygon_index);
emit_signal(SNAME("changed"));
}
diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp
index 87ff225de9..41e78e0bc8 100644
--- a/scene/resources/visual_shader.cpp
+++ b/scene/resources/visual_shader.cpp
@@ -367,7 +367,7 @@ String VisualShaderNodeCustom::generate_code(Shader::Mode p_mode, VisualShader::
if (!nend) {
code += "\n }";
} else {
- code.remove(code.size() - 1);
+ code.remove_at(code.size() - 1);
code += "}";
}
code += "\n";
diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp
index 774a5b1da0..f7c8f0921c 100644
--- a/servers/audio_server.cpp
+++ b/servers/audio_server.cpp
@@ -762,7 +762,7 @@ void AudioServer::remove_bus(int p_index) {
lock();
bus_map.erase(buses[p_index]->name);
memdelete(buses[p_index]);
- buses.remove(p_index);
+ buses.remove_at(p_index);
unlock();
emit_signal(SNAME("bus_layout_changed"));
@@ -833,7 +833,7 @@ void AudioServer::move_bus(int p_bus, int p_to_pos) {
}
Bus *bus = buses[p_bus];
- buses.remove(p_bus);
+ buses.remove_at(p_bus);
if (p_to_pos == -1) {
buses.push_back(bus);
@@ -1026,7 +1026,7 @@ void AudioServer::remove_bus_effect(int p_bus, int p_effect) {
lock();
- buses[p_bus]->effects.remove(p_effect);
+ buses[p_bus]->effects.remove_at(p_effect);
_update_bus_effects(p_bus);
unlock();
diff --git a/servers/camera_server.cpp b/servers/camera_server.cpp
index 6f506d0f7a..8391a2ee2e 100644
--- a/servers/camera_server.cpp
+++ b/servers/camera_server.cpp
@@ -124,7 +124,7 @@ void CameraServer::remove_feed(const Ref<CameraFeed> &p_feed) {
#endif
// remove it from our array, if this results in our feed being unreferenced it will be destroyed
- feeds.remove(i);
+ feeds.remove_at(i);
// let whomever is interested know
emit_signal(SNAME("camera_feed_removed"), feed_id);
diff --git a/servers/physics_2d/godot_body_2d.h b/servers/physics_2d/godot_body_2d.h
index d1dbf92c1b..0df93482dc 100644
--- a/servers/physics_2d/godot_body_2d.h
+++ b/servers/physics_2d/godot_body_2d.h
@@ -169,7 +169,7 @@ public:
if (index > -1) {
areas.write[index].refCount -= 1;
if (areas[index].refCount < 1) {
- areas.remove(index);
+ areas.remove_at(index);
}
}
}
diff --git a/servers/physics_2d/godot_collision_object_2d.cpp b/servers/physics_2d/godot_collision_object_2d.cpp
index 3d4ebbedcd..719d9c874a 100644
--- a/servers/physics_2d/godot_collision_object_2d.cpp
+++ b/servers/physics_2d/godot_collision_object_2d.cpp
@@ -121,7 +121,7 @@ void GodotCollisionObject2D::remove_shape(int p_index) {
shapes.write[i].bpid = 0;
}
shapes[p_index].shape->remove_owner(this);
- shapes.remove(p_index);
+ shapes.remove_at(p_index);
if (!pending_shape_update_list.in_list()) {
GodotPhysicsServer2D::godot_singleton->pending_shape_update_list.add(&pending_shape_update_list);
diff --git a/servers/physics_3d/godot_body_3d.h b/servers/physics_3d/godot_body_3d.h
index ac3131ab44..bba9ec6c3a 100644
--- a/servers/physics_3d/godot_body_3d.h
+++ b/servers/physics_3d/godot_body_3d.h
@@ -163,7 +163,7 @@ public:
if (index > -1) {
areas.write[index].refCount -= 1;
if (areas[index].refCount < 1) {
- areas.remove(index);
+ areas.remove_at(index);
}
}
}
diff --git a/servers/physics_3d/godot_collision_object_3d.cpp b/servers/physics_3d/godot_collision_object_3d.cpp
index deb058b3ac..421291011b 100644
--- a/servers/physics_3d/godot_collision_object_3d.cpp
+++ b/servers/physics_3d/godot_collision_object_3d.cpp
@@ -118,7 +118,7 @@ void GodotCollisionObject3D::remove_shape(int p_index) {
shapes.write[i].bpid = 0;
}
shapes[p_index].shape->remove_owner(this);
- shapes.remove(p_index);
+ shapes.remove_at(p_index);
if (!pending_shape_update_list.in_list()) {
GodotPhysicsServer3D::godot_singleton->pending_shape_update_list.add(&pending_shape_update_list);
diff --git a/servers/physics_3d/godot_soft_body_3d.cpp b/servers/physics_3d/godot_soft_body_3d.cpp
index 231b8686f5..43d4433302 100644
--- a/servers/physics_3d/godot_soft_body_3d.cpp
+++ b/servers/physics_3d/godot_soft_body_3d.cpp
@@ -374,7 +374,7 @@ void GodotSoftBody3D::unpin_vertex(int p_index) {
uint32_t pinned_count = pinned_vertices.size();
for (uint32_t i = 0; i < pinned_count; ++i) {
if (p_index == pinned_vertices[i]) {
- pinned_vertices.remove(i);
+ pinned_vertices.remove_at(i);
if (!soft_mesh.is_null()) {
ERR_FAIL_COND(p_index >= (int)map_visual_to_physics.size());
diff --git a/servers/physics_3d/godot_soft_body_3d.h b/servers/physics_3d/godot_soft_body_3d.h
index 5198186b5d..14ddc419cf 100644
--- a/servers/physics_3d/godot_soft_body_3d.h
+++ b/servers/physics_3d/godot_soft_body_3d.h
@@ -148,7 +148,7 @@ public:
if (index > -1) {
areas.write[index].refCount -= 1;
if (areas[index].refCount < 1) {
- areas.remove(index);
+ areas.remove_at(index);
}
}
}
diff --git a/servers/rendering/renderer_canvas_cull.h b/servers/rendering/renderer_canvas_cull.h
index a2fdf95c76..bdd61123df 100644
--- a/servers/rendering/renderer_canvas_cull.h
+++ b/servers/rendering/renderer_canvas_cull.h
@@ -152,7 +152,7 @@ public:
void erase_item(Item *p_item) {
int idx = find_item(p_item);
if (idx >= 0) {
- child_items.remove(idx);
+ child_items.remove_at(idx);
}
}
diff --git a/servers/rendering/renderer_scene_cull.cpp b/servers/rendering/renderer_scene_cull.cpp
index 7b4e2d34df..5b834db178 100644
--- a/servers/rendering/renderer_scene_cull.cpp
+++ b/servers/rendering/renderer_scene_cull.cpp
@@ -1313,7 +1313,7 @@ void RendererSceneCull::_update_instance_visibility_dependencies(Instance *p_ins
bool needs_visibility_cull = has_visibility_range && is_geometry_instance && p_instance->array_index != -1;
if (!needs_visibility_cull && p_instance->visibility_index != -1) {
- p_instance->scenario->instance_visibility.remove(p_instance->visibility_index);
+ p_instance->scenario->instance_visibility.remove_at(p_instance->visibility_index);
p_instance->visibility_index = -1;
} else if (needs_visibility_cull && p_instance->visibility_index == -1) {
InstanceVisibilityData vd;
diff --git a/servers/rendering/shader_language.cpp b/servers/rendering/shader_language.cpp
index f865aab677..c7a7ed154e 100644
--- a/servers/rendering/shader_language.cpp
+++ b/servers/rendering/shader_language.cpp
@@ -6073,7 +6073,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
_set_error("Invalid arguments to unary operator '" + get_operator_text(op->op) + "' :" + at);
return nullptr;
}
- expression.remove(i + 1);
+ expression.remove_at(i + 1);
}
} else if (is_ternary) {
@@ -6113,7 +6113,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
}
for (int i = 0; i < 4; i++) {
- expression.remove(next_op);
+ expression.remove_at(next_op);
}
} else {
@@ -6174,8 +6174,8 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
return nullptr;
}
- expression.remove(next_op);
- expression.remove(next_op);
+ expression.remove_at(next_op);
+ expression.remove_at(next_op);
}
}
diff --git a/servers/text_server.cpp b/servers/text_server.cpp
index 8fc1b56ae4..3b71dc1d92 100644
--- a/servers/text_server.cpp
+++ b/servers/text_server.cpp
@@ -78,7 +78,7 @@ void TextServerManager::remove_interface(const Ref<TextServer> &p_interface) {
ERR_FAIL_COND(idx == -1);
print_verbose("TextServer: Removed interface \"" + p_interface->get_name() + "\"");
emit_signal(SNAME("interface_removed"), p_interface->get_name());
- interfaces.remove(idx);
+ interfaces.remove_at(idx);
}
int TextServerManager::get_interface_count() const {
@@ -141,7 +141,7 @@ TextServerManager::~TextServerManager() {
primary_interface.unref();
}
while (interfaces.size() > 0) {
- interfaces.remove(0);
+ interfaces.remove_at(0);
}
singleton = nullptr;
}
@@ -1024,7 +1024,7 @@ Vector<Vector2> TextServer::shaped_text_get_selection(RID p_shaped, int p_start,
while (j < ranges.size()) {
if (Math::is_equal_approx(ranges[i].y, ranges[j].x, (real_t)UNIT_EPSILON)) {
ranges.write[i].y = ranges[j].y;
- ranges.remove(j);
+ ranges.remove_at(j);
continue;
}
j++;
diff --git a/servers/xr_server.cpp b/servers/xr_server.cpp
index d0367ba95e..959288497d 100644
--- a/servers/xr_server.cpp
+++ b/servers/xr_server.cpp
@@ -193,7 +193,7 @@ void XRServer::remove_interface(const Ref<XRInterface> &p_interface) {
print_verbose("XR: Removed interface" + p_interface->get_name());
emit_signal(SNAME("interface_removed"), p_interface->get_name());
- interfaces.remove(idx);
+ interfaces.remove_at(idx);
};
int XRServer::get_interface_count() const {
@@ -396,7 +396,7 @@ XRServer::~XRServer() {
primary_interface.unref();
while (interfaces.size() > 0) {
- interfaces.remove(0);
+ interfaces.remove_at(0);
}
// TODO pretty sure there is a clear function or something...
diff --git a/tests/core/templates/test_local_vector.h b/tests/core/templates/test_local_vector.h
index eff2a16abc..67bcf515f9 100644
--- a/tests/core/templates/test_local_vector.h
+++ b/tests/core/templates/test_local_vector.h
@@ -84,25 +84,25 @@ TEST_CASE("[LocalVector] Remove.") {
vector.push_back(3);
vector.push_back(4);
- vector.remove(0);
+ vector.remove_at(0);
CHECK(vector[0] == 1);
CHECK(vector[1] == 2);
CHECK(vector[2] == 3);
CHECK(vector[3] == 4);
- vector.remove(2);
+ vector.remove_at(2);
CHECK(vector[0] == 1);
CHECK(vector[1] == 2);
CHECK(vector[2] == 4);
- vector.remove(1);
+ vector.remove_at(1);
CHECK(vector[0] == 1);
CHECK(vector[1] == 4);
- vector.remove(0);
+ vector.remove_at(0);
CHECK(vector[0] == 4);
}
@@ -117,7 +117,7 @@ TEST_CASE("[LocalVector] Remove Unordered.") {
CHECK(vector.size() == 5);
- vector.remove_unordered(0);
+ vector.remove_at_unordered(0);
CHECK(vector.size() == 4);
@@ -128,7 +128,7 @@ TEST_CASE("[LocalVector] Remove Unordered.") {
CHECK(vector.find(4) != -1);
// Now the vector is no more ordered.
- vector.remove_unordered(vector.find(3));
+ vector.remove_at_unordered(vector.find(3));
CHECK(vector.size() == 3);
@@ -137,7 +137,7 @@ TEST_CASE("[LocalVector] Remove Unordered.") {
CHECK(vector.find(2) != -1);
CHECK(vector.find(4) != -1);
- vector.remove_unordered(vector.find(2));
+ vector.remove_at_unordered(vector.find(2));
CHECK(vector.size() == 2);
@@ -145,7 +145,7 @@ TEST_CASE("[LocalVector] Remove Unordered.") {
CHECK(vector.find(1) != -1);
CHECK(vector.find(4) != -1);
- vector.remove_unordered(vector.find(4));
+ vector.remove_at_unordered(vector.find(4));
CHECK(vector.size() == 1);
@@ -153,7 +153,7 @@ TEST_CASE("[LocalVector] Remove Unordered.") {
CHECK(vector.find(1) != -1);
// Remove the last one.
- vector.remove_unordered(0);
+ vector.remove_at_unordered(0);
CHECK(vector.is_empty());
CHECK(vector.size() == 0);
@@ -193,9 +193,9 @@ TEST_CASE("[LocalVector] Size / Resize / Reserve.") {
// Capacity is supposed to change only when the size increase.
CHECK(vector.get_capacity() >= 10);
- vector.remove(0);
- vector.remove(0);
- vector.remove(0);
+ vector.remove_at(0);
+ vector.remove_at(0);
+ vector.remove_at(0);
CHECK(vector.size() == 2);
// Capacity is supposed to change only when the size increase.
diff --git a/tests/core/templates/test_vector.h b/tests/core/templates/test_vector.h
index bfdf389aa7..658ca5adf1 100644
--- a/tests/core/templates/test_vector.h
+++ b/tests/core/templates/test_vector.h
@@ -129,7 +129,7 @@ TEST_CASE("[Vector] Fill large array and modify it") {
CHECK(vector[200] == 0);
CHECK(vector[499'999] == 0x60d07);
CHECK(vector[999'999] == 0x60d07);
- vector.remove(200);
+ vector.remove_at(200);
CHECK(vector[200] == 0x60d07);
vector.clear();
@@ -145,7 +145,7 @@ TEST_CASE("[Vector] Copy creation") {
vector.push_back(4);
Vector<int> vector_other = Vector<int>(vector);
- vector_other.remove(0);
+ vector_other.remove_at(0);
CHECK(vector_other[0] == 1);
CHECK(vector_other[1] == 2);
CHECK(vector_other[2] == 3);
@@ -168,7 +168,7 @@ TEST_CASE("[Vector] Duplicate") {
vector.push_back(4);
Vector<int> vector_other = vector.duplicate();
- vector_other.remove(0);
+ vector_other.remove_at(0);
CHECK(vector_other[0] == 1);
CHECK(vector_other[1] == 2);
CHECK(vector_other[2] == 3);
@@ -302,7 +302,7 @@ TEST_CASE("[Vector] Find, has") {
CHECK(!vector.has(5));
}
-TEST_CASE("[Vector] Remove") {
+TEST_CASE("[Vector] Remove at") {
Vector<int> vector;
vector.push_back(0);
vector.push_back(1);
@@ -310,30 +310,30 @@ TEST_CASE("[Vector] Remove") {
vector.push_back(3);
vector.push_back(4);
- vector.remove(0);
+ vector.remove_at(0);
CHECK(vector[0] == 1);
CHECK(vector[1] == 2);
CHECK(vector[2] == 3);
CHECK(vector[3] == 4);
- vector.remove(2);
+ vector.remove_at(2);
CHECK(vector[0] == 1);
CHECK(vector[1] == 2);
CHECK(vector[2] == 4);
- vector.remove(1);
+ vector.remove_at(1);
CHECK(vector[0] == 1);
CHECK(vector[1] == 4);
- vector.remove(0);
+ vector.remove_at(0);
CHECK(vector[0] == 4);
}
-TEST_CASE("[Vector] Remove and find") {
+TEST_CASE("[Vector] Remove at and find") {
Vector<int> vector;
vector.push_back(0);
vector.push_back(1);
@@ -343,7 +343,7 @@ TEST_CASE("[Vector] Remove and find") {
CHECK(vector.size() == 5);
- vector.remove(0);
+ vector.remove_at(0);
CHECK(vector.size() == 4);
@@ -353,7 +353,7 @@ TEST_CASE("[Vector] Remove and find") {
CHECK(vector.find(3) != -1);
CHECK(vector.find(4) != -1);
- vector.remove(vector.find(3));
+ vector.remove_at(vector.find(3));
CHECK(vector.size() == 3);
@@ -362,7 +362,7 @@ TEST_CASE("[Vector] Remove and find") {
CHECK(vector.find(2) != -1);
CHECK(vector.find(4) != -1);
- vector.remove(vector.find(2));
+ vector.remove_at(vector.find(2));
CHECK(vector.size() == 2);
@@ -370,14 +370,14 @@ TEST_CASE("[Vector] Remove and find") {
CHECK(vector.find(1) != -1);
CHECK(vector.find(4) != -1);
- vector.remove(vector.find(4));
+ vector.remove_at(vector.find(4));
CHECK(vector.size() == 1);
CHECK(vector.find(4) == -1);
CHECK(vector.find(1) != -1);
- vector.remove(0);
+ vector.remove_at(0);
CHECK(vector.is_empty());
CHECK(vector.size() == 0);
@@ -412,9 +412,9 @@ TEST_CASE("[Vector] Size, resize, reserve") {
CHECK(vector.size() == 5);
- vector.remove(0);
- vector.remove(0);
- vector.remove(0);
+ vector.remove_at(0);
+ vector.remove_at(0);
+ vector.remove_at(0);
CHECK(vector.size() == 2);
diff --git a/tests/core/variant/test_array.h b/tests/core/variant/test_array.h
index 298bd2ff63..e2e84f2962 100644
--- a/tests/core/variant/test_array.h
+++ b/tests/core/variant/test_array.h
@@ -129,20 +129,20 @@ TEST_CASE("[Array] has() and count()") {
CHECK(arr.count(2) == 0);
}
-TEST_CASE("[Array] remove()") {
+TEST_CASE("[Array] remove_at()") {
Array arr;
arr.push_back(1);
arr.push_back(2);
- arr.remove(0);
+ arr.remove_at(0);
CHECK(arr.size() == 1);
CHECK(int(arr[0]) == 2);
- arr.remove(0);
+ arr.remove_at(0);
CHECK(arr.size() == 0);
- // The array is now empty; try to use `remove()` again.
+ // The array is now empty; try to use `remove_at()` again.
// Normally, this prints an error message so we silence it.
ERR_PRINT_OFF;
- arr.remove(0);
+ arr.remove_at(0);
ERR_PRINT_ON;
CHECK(arr.size() == 0);