Code Cleanup: use const
authorCampbell Barton <ideasman42@gmail.com>
Fri, 11 Jul 2014 23:07:51 +0000 (09:07 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 11 Jul 2014 23:09:24 +0000 (09:09 +1000)
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/mask_rasterize.c
source/blender/blenkernel/intern/multires.c
source/blender/blenkernel/intern/tracking_region_tracker.c
source/blender/blenkernel/intern/tracking_stabilize.c
source/blender/blenkernel/intern/unit.c
source/blender/bmesh/intern/bmesh_interp.c

index 74907fd0662eceba42f52b547d9046dd4967c314..d9af6ac3454d889e602e5749e9a3deedf2b7de81 100644 (file)
@@ -1108,7 +1108,7 @@ static void weightpaint_color(unsigned char r_col[4], DMWeightColorInfo *dm_wcin
 
 static void calc_weightpaint_vert_color(
         unsigned char r_col[4],
-        MDeformVert *dv, 
+        const MDeformVert *dv,
         DMWeightColorInfo *dm_wcinfo,
         const int defbase_tot, const int defbase_act,
         const bool *defbase_sel, const int defbase_sel_tot,
@@ -1123,7 +1123,7 @@ static void calc_weightpaint_vert_color(
                bool was_a_nonzero = false;
                unsigned int i;
 
-               MDeformWeight *dw = dv->dw;
+               const MDeformWeight *dw = dv->dw;
                for (i = dv->totweight; i != 0; i--, dw++) {
                        /* in multipaint, get the average if auto normalize is inactive
                         * get the sum if it is active */
index 35207595103d828a1aae0abed24a2c307672a429..4dc8ed2146332423a8d047d10ba452196ae66c55 100644 (file)
@@ -326,7 +326,7 @@ static void maskrasterize_spline_differentiate_point_outset(float (*diff_feather
  *   are to any of the triangle edges.
  */
 static bool layer_bucket_isect_test(
-        MaskRasterLayer *layer, unsigned int face_index,
+        const MaskRasterLayer *layer, unsigned int face_index,
         const unsigned int bucket_x, const unsigned int bucket_y,
         const float bucket_size_x, const float bucket_size_y,
         const float bucket_max_rad_squared)
index 1d5bbbe1aeb5ce2f106fceb05c6fbabbef60c060..246ef8a33f53032141db141716fcaaf9f137ce17 100644 (file)
@@ -112,7 +112,7 @@ static BLI_bitmap *multires_mdisps_upsample_hidden(BLI_bitmap *lo_hidden,
 
                                                    /* assumed to be at hi_level (or
                                                     *  null) */
-                                                   BLI_bitmap *prev_hidden)
+                                                   const BLI_bitmap *prev_hidden)
 {
        BLI_bitmap *subd;
        int hi_gridsize = BKE_ccg_gridsize(hi_level);
index 76b7ad5d9829a35c6a98eb3138540a95d9ba806b..6300e29f51650be96a8a6e28d3102358beae0aaf 100644 (file)
@@ -501,7 +501,7 @@ static void tracking_scale_marker_search(const MovieTrackingMarker *old_marker,
 static void tracking_insert_new_marker(MovieTrackingContext *context, MovieTrackingTrack *track,
                                        const MovieTrackingMarker *old_marker, int curfra, bool tracked,
                                        int frame_width, int frame_height,
-                                       double dst_pixel_x[5], double dst_pixel_y[5])
+                                       const double dst_pixel_x[5], const double dst_pixel_y[5])
 {
        MovieTrackingMarker new_marker;
        int frame_delta = context->backwards ? -1 : 1;
index ffbdf5cb486ba11b8a2cee4e0d61d9ee256c07f7..9ede39fd66606ce362ab8afe6f98f84ee0bb2b68 100644 (file)
@@ -82,7 +82,7 @@ static bool stabilization_median_point_get(MovieTracking *tracking, int framenr,
  * NOTE: frame number should be in clip space, not scene space
  */
 static void stabilization_calculate_data(MovieTracking *tracking, int framenr, int width, int height,
-                                         float firstmedian[2], float median[2],
+                                         const float firstmedian[2], const float median[2],
                                          float translation[2], float *scale, float *angle)
 {
        MovieTrackingStabilization *stab = &tracking->stabilization;
index 8aca9f7870268b0d842cf85b89a80f7422ce3d1a..f7024dee9d16acc9600f02fbdf1084f8929bf74a 100644 (file)
@@ -349,7 +349,7 @@ static void unit_dual_convert(double value, bUnitCollection *usys, bUnitDef **un
 
 static size_t unit_as_string(char *str, int len_max, double value, int prec, bUnitCollection *usys,
                              /* non exposed options */
-                             bUnitDef *unit, char pad)
+                             const bUnitDef *unit, char pad)
 {
        double value_conv;
        size_t len, i;
index 2250b8135d736eb4b715d05e7c3e205a35cafaf7..306b6e743503696309b41c1a29b68b71986022c7 100644 (file)
@@ -397,8 +397,8 @@ static float bm_loop_flip_equotion(float mat[2][2], float b[2], const float targ
        return mat[0][0] * mat[1][1] - mat[0][1] * mat[1][0];
 }
 
-static void bm_loop_flip_disp(float source_axis_x[3], float source_axis_y[3],
-                                 float target_axis_x[3], float target_axis_y[3], float disp[3])
+static void bm_loop_flip_disp(const float source_axis_x[3], const float source_axis_y[3],
+                              const float target_axis_x[3], const float target_axis_y[3], float disp[3])
 {
        float vx[3], vy[3], coord[3];
        float n[3], vec[3];