[Bf-blender-cvs] [d1bd33407da] master: Cleanup: pass const variables

Campbell Barton noreply at git.blender.org
Thu Feb 13 04:14:54 CET 2020


Commit: d1bd33407da3183335805beec561c18e6f5aa6e0
Author: Campbell Barton
Date:   Thu Feb 13 14:01:52 2020 +1100
Branches: master
https://developer.blender.org/rBd1bd33407da3183335805beec561c18e6f5aa6e0

Cleanup: pass const variables

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

M	intern/cycles/device/device_multi.cpp
M	source/blender/blenkernel/intern/anim.c
M	source/blender/blenkernel/intern/fluid.c
M	source/blender/blenkernel/intern/idprop.c
M	source/blender/blenkernel/intern/tracking_stabilize.c
M	source/blender/blenlib/intern/delaunay_2d.c
M	source/blender/blenlib/intern/math_base_inline.c
M	source/blender/draw/engines/overlay/overlay_background.c
M	source/blender/editors/mask/mask_intern.h
M	source/blender/editors/mask/mask_select.c
M	source/blender/editors/sculpt_paint/sculpt.c
M	source/blender/editors/sculpt_paint/sculpt_intern.h
M	source/blender/editors/transform/transform_snap_object.c
M	source/blender/modifiers/intern/MOD_datatransfer.c
M	source/blender/modifiers/intern/MOD_weighted_normal.c

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

diff --git a/intern/cycles/device/device_multi.cpp b/intern/cycles/device/device_multi.cpp
index 9cbf69a191a..8226221ea08 100644
--- a/intern/cycles/device/device_multi.cpp
+++ b/intern/cycles/device/device_multi.cpp
@@ -394,7 +394,7 @@ class MultiDevice : public Device {
 
       if (mem.device == this && denoising_devices.empty()) {
         /* Skip unnecessary copies in viewport mode (buffer covers the
-         * whole image), but still need to fix up the tile evice pointer. */
+         * whole image), but still need to fix up the tile device pointer. */
         map_tile(sub_device, tiles[i]);
         continue;
       }
@@ -407,7 +407,7 @@ class MultiDevice : public Device {
         /* Only copy from device to host once. This is faster, but
          * also required for the case where a CPU thread is denoising
          * a tile rendered on the GPU. In that case we have to avoid
-         * overwriting the buffer being denoised by the CPU thread. */
+         * overwriting the buffer being de-noised by the CPU thread. */
         if (!tiles[i].buffers->map_neighbor_copied) {
           tiles[i].buffers->map_neighbor_copied = true;
           mem.copy_from_device();
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c
index 6b8f8e5303e..2ebb08450ad 100644
--- a/source/blender/blenkernel/intern/anim.c
+++ b/source/blender/blenkernel/intern/anim.c
@@ -476,7 +476,7 @@ int where_on_path(Object *ob,
 
   /* NOTE: commented out for follow constraint
    *
-   *       If it's ever be uncommented watch out for curve_deform_verts()
+   *       If it's ever be uncommentet watch out for curve_deform_verts()
    *       which used to temporary set CU_FOLLOW flag for the curve and no
    *       longer does it (because of threading issues of such a thing.
    */
diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c
index d38541c8bbe..6cf748d6a7f 100644
--- a/source/blender/blenkernel/intern/fluid.c
+++ b/source/blender/blenkernel/intern/fluid.c
@@ -1563,7 +1563,7 @@ static void sample_mesh(FluidFlowSettings *mfs,
 
   /* Distance between two opposing vertices in a unit cube.
    * I.e. the unit cube diagonal or sqrt(3).
-   * This value is our nearest neighbour search distance. */
+   * This value is our nearest neighbor search distance. */
   const float surface_distance = 1.732;
   nearest.dist_sq = surface_distance * surface_distance; /* find_nearest uses squared distance. */
 
diff --git a/source/blender/blenkernel/intern/idprop.c b/source/blender/blenkernel/intern/idprop.c
index e5b710b3619..33d468dee0f 100644
--- a/source/blender/blenkernel/intern/idprop.c
+++ b/source/blender/blenkernel/intern/idprop.c
@@ -104,7 +104,7 @@ IDProperty *IDP_CopyIDPArray(const IDProperty *array, const int flag)
      * which doesn't work here.  instead, simply copy the
      * contents of the new structure into the array cell,
      * then free it.  this makes for more maintainable
-     * code than simply reimplementing the copy functions
+     * code than simply re-implementing the copy functions
      * in this loop.*/
     tmp = IDP_CopyProperty_ex(GETPROP(narray, i), flag);
     memcpy(GETPROP(narray, i), tmp, sizeof(IDProperty));
diff --git a/source/blender/blenkernel/intern/tracking_stabilize.c b/source/blender/blenkernel/intern/tracking_stabilize.c
index b5b33353ed7..89537b3f788 100644
--- a/source/blender/blenkernel/intern/tracking_stabilize.c
+++ b/source/blender/blenkernel/intern/tracking_stabilize.c
@@ -384,7 +384,7 @@ static MovieTrackingMarker *get_tracking_data_point(StabContext *ctx,
 }
 
 /* Define the reference point for rotation/scale measurement and compensation.
- * The stabilizator works by assuming the image was distorted by a affine linear
+ * The stabilizer works by assuming the image was distorted by a affine linear
  * transform, i.e. it was rotated and stretched around this reference point
  * (pivot point) and then shifted laterally. Any scale and orientation changes
  * will be picked up relative to this point. And later the image will be
diff --git a/source/blender/blenlib/intern/delaunay_2d.c b/source/blender/blenlib/intern/delaunay_2d.c
index 7287bec0849..8fa429fc0c3 100644
--- a/source/blender/blenlib/intern/delaunay_2d.c
+++ b/source/blender/blenlib/intern/delaunay_2d.c
@@ -1375,7 +1375,7 @@ static void add_edge_constraint(
         isect = isect_seg_seg_v2_lambda_mu_db(va->co, vb->co, curco, v2->co, &lambda, NULL);
         if (isect == ISECT_LINE_LINE_NONE || isect == ISECT_LINE_LINE_EXACT) {
           /* The orient tests say that there is an intersection between
-           * va and vb, but the inexect isect routine has either put the
+           * va and vb, but the inexact intersection routine has either put the
            * intersection exactly on one of the endpoints or just outside
            * one of them.
            * Or this is an exact intersection at one of the curco / v2 ends.
@@ -2443,7 +2443,7 @@ static CDT_result *cdt_get_output(CDT_state *cdt,
  * The current initial Deluanay triangulation algorithm is the Guibas-Stolfi Divide and Conquer
  * algorithm (see "Primitives for the Manipulation of General Subdivisions and the Computation of
  * Voronoi Diagrams"). and uses Shewchuk's exact predicates to issues where numeric errors cause
- * inconsistent geometric judgements. This is followed by inserting edge constraints (including the
+ * inconsistent geometric judgments. This is followed by inserting edge constraints (including the
  * edges implied by faces) using the algorithms discussed in "Fully Dynamic Constrained Delaunay
  * Triangulations" by Kallmann, Bieri, and Thalmann.
  *
@@ -3085,7 +3085,7 @@ static void write_cdt_input_to_file(const CDT_input *inp)
 #  ifndef NDEBUG /* Only used in assert. */
 /*
  * Is a visible from b: i.e., ab crosses no edge of cdt?
- * If constrained is true, consider only constrained edges as possible crossers.
+ * If constrained is true, consider only constrained edges as possible crosser's.
  * In any case, don't count an edge ab itself.
  * Note: this is an expensive test if there are a lot of edges.
  */
diff --git a/source/blender/blenlib/intern/math_base_inline.c b/source/blender/blenlib/intern/math_base_inline.c
index 0a496d2bd68..c0ee658d434 100644
--- a/source/blender/blenlib/intern/math_base_inline.c
+++ b/source/blender/blenlib/intern/math_base_inline.c
@@ -598,7 +598,7 @@ MINLINE int integer_digits_i(const int i)
 
 /* Calculate initial guess for arg^exp based on float representation
  * This method gives a constant bias, which can be easily compensated by
- * multiplicating with bias_coeff.
+ * multiplying with bias_coeff.
  * Gives better results for exponents near 1 (e. g. 4/5).
  * exp = exponent, encoded as uint32_t
  * e2coeff = 2^(127/exponent - 127) * bias_coeff^(1/exponent), encoded as
diff --git a/source/blender/draw/engines/overlay/overlay_background.c b/source/blender/draw/engines/overlay/overlay_background.c
index 23aad3506ad..6fd3cc78c65 100644
--- a/source/blender/draw/engines/overlay/overlay_background.c
+++ b/source/blender/draw/engines/overlay/overlay_background.c
@@ -51,7 +51,7 @@ void OVERLAY_background_cache_init(OVERLAY_Data *vedata)
     }
     else if (v3d->shading.background_type == V3D_SHADING_BACKGROUND_WORLD && scene->world) {
       background_type = BG_SOLID;
-      /* TODO(fclem) this is a scene refered linear color. we should convert
+      /* TODO(fclem) this is a scene referred linear color. we should convert
        * it to display linear here. */
       copy_v3_v3(color_override, &scene->world->horr);
       color_override[3] = 1.0f;
diff --git a/source/blender/editors/mask/mask_intern.h b/source/blender/editors/mask/mask_intern.h
index 7cf92a9051a..091cf4937ae 100644
--- a/source/blender/editors/mask/mask_intern.h
+++ b/source/blender/editors/mask/mask_intern.h
@@ -113,9 +113,9 @@ void MASK_OT_select_linked(struct wmOperatorType *ot);
 void MASK_OT_select_more(struct wmOperatorType *ot);
 void MASK_OT_select_less(struct wmOperatorType *ot);
 
-bool ED_mask_spline_select_check(struct MaskSpline *spline);
-bool ED_mask_layer_select_check(struct MaskLayer *mask_layer);
-bool ED_mask_select_check(struct Mask *mask);
+bool ED_mask_spline_select_check(const struct MaskSpline *spline);
+bool ED_mask_layer_select_check(const struct MaskLayer *mask_layer);
+bool ED_mask_select_check(const struct Mask *mask);
 
 void ED_mask_spline_select_set(struct MaskSpline *spline, const bool do_select);
 void ED_mask_layer_select_set(struct MaskLayer *mask_layer, const bool do_select);
diff --git a/source/blender/editors/mask/mask_select.c b/source/blender/editors/mask/mask_select.c
index 656c055a7d9..9e1aaa5e6f4 100644
--- a/source/blender/editors/mask/mask_select.c
+++ b/source/blender/editors/mask/mask_select.c
@@ -53,7 +53,7 @@
  * \{ */
 
 /* 'check' select */
-bool ED_mask_spline_select_check(MaskSpline *spline)
+bool ED_mask_spline_select_check(const MaskSpline *spline)
 {
   int i;
 
@@ -68,13 +68,13 @@ bool ED_mask_spline_select_check(MaskSpline *spline)
   return false;
 }
 
-bool ED_mask_layer_select_check(MaskLayer *mask_layer)
+bool ED_mask_layer_select_check(const MaskLayer *mask_layer)
 {
   if (mask_layer->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) {
     return false;
   }
 
-  for (MaskSpline *spline = mask_layer->splines.first; spline; spline = spline->next) {
+  for (const MaskSpline *spline = mask_layer->splines.first; spline; spline = spline->next) {
     if (ED_mask_spline_select_check(spline)) {
       return true;
     }
@@ -83,9 +83,10 @@ bool ED_mask_layer_select_check(MaskLayer *mask_layer)
   return false;
 }
 
-bool ED_mask_select_check(Mask *mask)
+bool ED_mask_select_check(const Mask *mask)
 {
-  for (MaskLayer *mask_layer = mask->masklayers.first; mask_layer; mask_layer = mask_layer->next) {
+  for (const MaskLayer *mask_layer = mask->masklayers.first; mask_layer;
+       mask_layer = mask_layer->next) {
     if (ED_mask_layer_select_check(mask_layer)) {
       return true;
     }
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 92c74538fd1..e2def28137f 

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list