Commit: 43268c1997871a02c06e686d61892cb48753d1ed
Author: Sergey Sharybin
Date:   Fri Jan 20 17:54:17 2017 +0100
Branches: master
https://developer.blender.org/rB43268c1997871a02c06e686d61892cb48753d1ed

Cycles: Use more const qualifiers to avoid possible issues

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

M       intern/cycles/bvh/bvh_build.cpp

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

diff --git a/intern/cycles/bvh/bvh_build.cpp b/intern/cycles/bvh/bvh_build.cpp
index 9ff68333c8..1ce3a75446 100644
--- a/intern/cycles/bvh/bvh_build.cpp
+++ b/intern/cycles/bvh/bvh_build.cpp
@@ -114,7 +114,7 @@ BVHBuild::~BVHBuild()
 
 void BVHBuild::add_reference_triangles(BoundBox& root, BoundBox& center, Mesh 
*mesh, int i)
 {
-       Attribute *attr_mP = NULL;
+       const Attribute *attr_mP = NULL;
        if(mesh->has_motion_blur()) {
                attr_mP = 
mesh->attributes.find(ATTR_STD_MOTION_VERTEX_POSITION);
        }
@@ -222,11 +222,11 @@ void BVHBuild::add_reference_triangles(BoundBox& root, 
BoundBox& center, Mesh *m
 
 void BVHBuild::add_reference_curves(BoundBox& root, BoundBox& center, Mesh 
*mesh, int i)
 {
-       Attribute *curve_attr_mP = NULL;
+       const Attribute *curve_attr_mP = NULL;
        if(mesh->has_motion_blur()) {
                curve_attr_mP = 
mesh->curve_attributes.find(ATTR_STD_MOTION_VERTEX_POSITION);
        }
-       size_t num_curves = mesh->num_curves();
+       const size_t num_curves = mesh->num_curves();
        for(uint j = 0; j < num_curves; j++) {
                const Mesh::Curve curve = mesh->get_curve(j);
                const float *curve_radius = &mesh->curve_radius[0];

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to