[Bf-blender-cvs] [d3e4eecaa5] master: Cycles: Cleanup, avoid shadowing

Sergey Sharybin noreply at git.blender.org
Mon Jan 16 17:56:08 CET 2017


Commit: d3e4eecaa5f1c815e3ecfda5461a099efffc8b65
Author: Sergey Sharybin
Date:   Mon Jan 16 17:54:39 2017 +0100
Branches: master
https://developer.blender.org/rBd3e4eecaa5f1c815e3ecfda5461a099efffc8b65

Cycles: Cleanup, avoid shadowing

===================================================================

M	intern/cycles/bvh/bvh_build.cpp

===================================================================

diff --git a/intern/cycles/bvh/bvh_build.cpp b/intern/cycles/bvh/bvh_build.cpp
index 036500843c..038070cba4 100644
--- a/intern/cycles/bvh/bvh_build.cpp
+++ b/intern/cycles/bvh/bvh_build.cpp
@@ -130,12 +130,13 @@ void BVHBuild::add_reference_mesh(BoundBox& root, BoundBox& center, Mesh *mesh,
 
 			/* motion triangles */
 			if(attr_mP) {
-				size_t mesh_size = mesh->verts.size();
-				size_t steps = mesh->motion_steps - 1;
-				float3 *vert_steps = attr_mP->data_float3();
+				const size_t mesh_size = mesh->verts.size();
+				const size_t num_steps = mesh->motion_steps - 1;
+				const float3 *vert_steps = attr_mP->data_float3();
 
-				for(size_t i = 0; i < steps; i++)
-					t.bounds_grow(vert_steps + i*mesh_size, bounds);
+				for(size_t step = 0; step < num_steps; step++) {
+					t.bounds_grow(vert_steps + step*mesh_size, bounds);
+				}
 
 				type = PRIMITIVE_MOTION_TRIANGLE;
 			}




More information about the Bf-blender-cvs mailing list