Cycles: Make it more clear values never changes by using const qualifier
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 27 Feb 2017 12:30:11 +0000 (13:30 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 27 Feb 2017 14:21:14 +0000 (15:21 +0100)
intern/cycles/blender/blender_curves.cpp

index e42ff5d72a623a191eb7a6d7702e0bbce5ad9d25..9214882bb9b08d4bbd377230c79fa9551df5cabb 100644 (file)
@@ -890,7 +890,7 @@ void BlenderSync::sync_curves(Mesh *mesh,
        }
 
        /* obtain general settings */
-       bool use_curves = scene->curve_system_manager->use_curves;
+       const bool use_curves = scene->curve_system_manager->use_curves;
 
        if(!(use_curves && b_ob.mode() != b_ob.mode_PARTICLE_EDIT)) {
                if(!motion)
@@ -898,11 +898,11 @@ void BlenderSync::sync_curves(Mesh *mesh,
                return;
        }
 
-       int primitive = scene->curve_system_manager->primitive;
-       int triangle_method = scene->curve_system_manager->triangle_method;
-       int resolution = scene->curve_system_manager->resolution;
-       size_t vert_num = mesh->verts.size();
-       size_t tri_num = mesh->num_triangles();
+       const int primitive = scene->curve_system_manager->primitive;
+       const int triangle_method = scene->curve_system_manager->triangle_method;
+       const int resolution = scene->curve_system_manager->resolution;
+       const size_t vert_num = mesh->verts.size();
+       const size_t tri_num = mesh->num_triangles();
        int used_res = 1;
 
        /* extract particle hair data - should be combined with connecting to mesh later*/