summaryrefslogtreecommitdiff
path: root/tests/test_render.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-07-24 14:21:06 +0200
committerGitHub <noreply@github.com>2021-07-24 14:21:06 +0200
commit96d7bc62af25b85b8b9cc091eeea1e7a784ba624 (patch)
tree83d8a70c911fe7f8d20080a1395d195eb8370d05 /tests/test_render.cpp
parent9ac27b58c53b50b5c7085a8fdee653e9eff159d1 (diff)
parent4e6efd1b07f1c6d53d226977ddc729333b74306a (diff)
Merge pull request #50511 from aaronfranke/iterators
Use C++ range iterators for Lists in many situations
Diffstat (limited to 'tests/test_render.cpp')
-rw-r--r--tests/test_render.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_render.cpp b/tests/test_render.cpp
index fe223ca258..66fd04dbdd 100644
--- a/tests/test_render.cpp
+++ b/tests/test_render.cpp
@@ -210,12 +210,12 @@ public:
//return quit;
- for (List<InstanceInfo>::Element *E = instances.front(); E; E = E->next()) {
- Transform3D pre(Basis(E->get().rot_axis, ofs), Vector3());
- vs->instance_set_transform(E->get().instance, pre * E->get().base);
+ for (InstanceInfo &E : instances) {
+ Transform3D pre(Basis(E.rot_axis, ofs), Vector3());
+ vs->instance_set_transform(E.instance, pre * E.base);
/*
if( !E->next() ) {
- vs->free( E->get().instance );
+ vs->free( E.instance );
instances.erase(E );
}*/
}