summaryrefslogtreecommitdiff
path: root/scene/animation
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2021-07-26 17:50:35 +0200
committerRémi Verschelde <rverschelde@gmail.com>2021-07-26 19:27:11 +0200
commit92299989bd10fd9855b6d77bc2bfabae218d1eea (patch)
tree7102f96ac3722e82c2cae7ad8bd4a5b5e7961989 /scene/animation
parentfef27e9b5b9b125ff535513c80b45953e8717f7d (diff)
Use Ref<T> references as iterators where relevant
And const when possible.
Diffstat (limited to 'scene/animation')
-rw-r--r--scene/animation/tween.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/scene/animation/tween.cpp b/scene/animation/tween.cpp
index b31c3d57f9..a57e986877 100644
--- a/scene/animation/tween.cpp
+++ b/scene/animation/tween.cpp
@@ -46,8 +46,8 @@ void Tween::start_tweeners() {
ERR_FAIL_MSG("Tween without commands, aborting.");
}
- for (Ref<Tweener> E : tweeners.write[current_step]) {
- E->start();
+ for (Ref<Tweener> &tweener : tweeners.write[current_step]) {
+ tweener->start();
}
}
@@ -253,11 +253,11 @@ bool Tween::step(float p_delta) {
float step_delta = rem_delta;
step_active = false;
- for (Ref<Tweener> E : tweeners.write[current_step]) {
+ for (Ref<Tweener> &tweener : tweeners.write[current_step]) {
// Modified inside Tweener.step().
float temp_delta = rem_delta;
// Turns to true if any Tweener returns true (i.e. is still not finished).
- step_active = E->step(temp_delta) || step_active;
+ step_active = tweener->step(temp_delta) || step_active;
step_delta = MIN(temp_delta, rem_delta);
}