1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Use const references where possible for List range iterators

This commit is contained in:
Rémi Verschelde
2021-07-24 15:46:25 +02:00
parent a0f7f42b84
commit ac3322b0af
171 changed files with 649 additions and 650 deletions

View File

@@ -729,7 +729,7 @@ void Curve2D::_bake() const {
Vector2 *w = baked_point_cache.ptrw();
int idx = 0;
for (Vector2 &E : pointlist) {
for (const Vector2 &E : pointlist) {
w[idx] = E;
idx++;
}
@@ -1239,7 +1239,7 @@ void Curve3D::_bake() const {
Vector3 prev_up = Vector3(0, 1, 0);
Vector3 prev_forward = Vector3(0, 0, 1);
for (Plane &E : pointlist) {
for (const Plane &E : pointlist) {
w[idx] = E.normal;
wt[idx] = E.d;