Cycles: Cleanup, always use parenthesis
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 19 Sep 2016 12:59:24 +0000 (14:59 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 19 Sep 2016 13:18:27 +0000 (15:18 +0200)
Makes it simpler to compare different traversal algorithms.

intern/cycles/kernel/bvh/bvh_shadow_all.h
intern/cycles/kernel/bvh/qbvh_shadow_all.h

index f9da2a3..0c0a877 100644 (file)
@@ -355,8 +355,9 @@ bool BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals *kg,
                                triangle_intersect_precalc(dir, &isect_precalc);
 
                                /* scale isect->t to adjust for instancing */
-                               for(int i = 0; i < num_hits_in_instance; i++)
+                               for(int i = 0; i < num_hits_in_instance; i++) {
                                        (isect_array-i-1)->t *= t_fac;
+                               }
                        }
                        else {
                                float ignore_t = FLT_MAX;
index 5043965..73dd18a 100644 (file)
@@ -437,8 +437,9 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(QBVH)(KernelGlobals *kg,
 #  endif
 
                                /* scale isect->t to adjust for instancing */
-                               for(int i = 0; i < num_hits_in_instance; i++)
+                               for(int i = 0; i < num_hits_in_instance; i++) {
                                        (isect_array-i-1)->t *= t_fac;
+                               }
                        }
                        else {
                                float ignore_t = FLT_MAX;