summaryrefslogtreecommitdiff
path: root/scene/resources/curve.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/curve.cpp')
-rw-r--r--scene/resources/curve.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/scene/resources/curve.cpp b/scene/resources/curve.cpp
index 53979e16df..71b4542970 100644
--- a/scene/resources/curve.cpp
+++ b/scene/resources/curve.cpp
@@ -729,8 +729,8 @@ void Curve2D::_bake() const {
Vector2 *w = baked_point_cache.ptrw();
int idx = 0;
- for (List<Vector2>::Element *E = pointlist.front(); E; E = E->next()) {
- w[idx] = E->get();
+ for (Vector2 &E : pointlist) {
+ w[idx] = E;
idx++;
}
}
@@ -1239,9 +1239,9 @@ void Curve3D::_bake() const {
Vector3 prev_up = Vector3(0, 1, 0);
Vector3 prev_forward = Vector3(0, 0, 1);
- for (List<Plane>::Element *E = pointlist.front(); E; E = E->next()) {
- w[idx] = E->get().normal;
- wt[idx] = E->get().d;
+ for (Plane &E : pointlist) {
+ w[idx] = E.normal;
+ wt[idx] = E.d;
if (!up_vector_enabled) {
idx++;