summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-11-24 07:59:56 +0100
committerGitHub <noreply@github.com>2021-11-24 07:59:56 +0100
commit96e70ac5f4f477eee3866ea788389a87d0dbd086 (patch)
tree21fb39b40de2674a99018d88e142e6f0196c68b0 /scene
parent5efe80f3085c8c6451363fe4c743bf3d7fc20b6c (diff)
parente078f970db0e72bcc665d714416e6fc74e8434a6 (diff)
Merge pull request #50139 from LightningAA/rename-remove-to-remove-at
Rename `remove()` to `remove_at()` when removing by index
Diffstat (limited to 'scene')
-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
39 files changed, 110 insertions, 110 deletions
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";