mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Use C++ iterators for Lists in many situations
This commit is contained in:
@@ -397,9 +397,7 @@ Ref<Image> GPUParticlesCollisionSDF::bake() {
|
||||
bake_step_function(0, "Finding Meshes");
|
||||
}
|
||||
|
||||
for (List<PlotMesh>::Element *E = plot_meshes.front(); E; E = E->next()) {
|
||||
const PlotMesh &pm = E->get();
|
||||
|
||||
for (PlotMesh &pm : plot_meshes) {
|
||||
for (int i = 0; i < pm.mesh->get_surface_count(); i++) {
|
||||
if (pm.mesh->surface_get_primitive_type(i) != Mesh::PRIMITIVE_TRIANGLES) {
|
||||
continue; //only triangles
|
||||
|
||||
Reference in New Issue
Block a user