diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-11-24 07:59:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-24 07:59:56 +0100 |
commit | 96e70ac5f4f477eee3866ea788389a87d0dbd086 (patch) | |
tree | 21fb39b40de2674a99018d88e142e6f0196c68b0 /scene/animation/animation_node_state_machine.cpp | |
parent | 5efe80f3085c8c6451363fe4c743bf3d7fc20b6c (diff) | |
parent | e078f970db0e72bcc665d714416e6fc74e8434a6 (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/animation/animation_node_state_machine.cpp')
-rw-r--r-- | scene/animation/animation_node_state_machine.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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(); }*/ |