Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-01-16 19:54:39 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-01-20 13:26:23 +0300
commitd28035aff31d0549a0f88df9e8c61686cccf4818 (patch)
tree5f117cbdc28a7ee51324057743b5db362f26632e /intern/cycles
parent618177640f7cce6fc946e558894aef803dd2893b (diff)
Cycles: Cleanup, avoid shadowing
Diffstat (limited to 'intern/cycles')
-rw-r--r--intern/cycles/bvh/bvh_build.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/intern/cycles/bvh/bvh_build.cpp b/intern/cycles/bvh/bvh_build.cpp
index 036500843c7..038070cba4c 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;
}