diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-02-13 06:01:52 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-02-13 06:14:33 +0300 |
commit | d1bd33407da3183335805beec561c18e6f5aa6e0 (patch) | |
tree | 564bd2c8b1d2c99ff3ad9d76628efa3ec04c292b | |
parent | f874f6817d1c793da4fd423a3c8bf0e504ebfa4a (diff) |
Cleanup: pass const variables
-rw-r--r-- | intern/cycles/device/device_multi.cpp | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/anim.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/fluid.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/idprop.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/tracking_stabilize.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/delaunay_2d.c | 6 | ||||
-rw-r--r-- | source/blender/blenlib/intern/math_base_inline.c | 2 | ||||
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_background.c | 2 | ||||
-rw-r--r-- | source/blender/editors/mask/mask_intern.h | 6 | ||||
-rw-r--r-- | source/blender/editors/mask/mask_select.c | 11 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 2 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_intern.h | 2 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_snap_object.c | 2 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_datatransfer.c | 2 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_weighted_normal.c | 2 |
15 files changed, 25 insertions, 24 deletions
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 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -1111,7 +1111,7 @@ bool sculpt_brush_test_circle_sq(SculptBrushTest *test, const float co[3]) bool sculpt_brush_test_cube(SculptBrushTest *test, const float co[3], - float local[4][4], + const float local[4][4], const float roundness) { float side = M_SQRT1_2; diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h index 0edac0f1b16..53c2c0ce51f 100644 --- a/source/blender/editors/sculpt_paint/sculpt_intern.h +++ b/source/blender/editors/sculpt_paint/sculpt_intern.h @@ -289,7 +289,7 @@ bool sculpt_brush_test_sphere_sq(SculptBrushTest *test, const float co[3]); bool sculpt_brush_test_sphere_fast(const SculptBrushTest *test, const float co[3]); bool sculpt_brush_test_cube(SculptBrushTest *test, const float co[3], - float local[4][4], + const float local[4][4], const float roundness); bool sculpt_brush_test_circle_sq(SculptBrushTest *test, const float co[3]); bool sculpt_search_sphere_cb(PBVHNode *node, void *data_v); diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c index 72076f64aa8..c4358168adb 100644 --- a/source/blender/editors/transform/transform_snap_object.c +++ b/source/blender/editors/transform/transform_snap_object.c @@ -1037,7 +1037,7 @@ static bool raycastObjects(SnapObjectContext *sctx, * \{ */ /* Test BoundBox */ -static bool snap_bound_box_check_dist(float min[3], +static bool snap_bound_box_check_dist(const float min[3], const float max[3], const float lpmat[4][4], const float win_size[2], diff --git a/source/blender/modifiers/intern/MOD_datatransfer.c b/source/blender/modifiers/intern/MOD_datatransfer.c index 5e6a5046a5b..3e79dd91d2b 100644 --- a/source/blender/modifiers/intern/MOD_datatransfer.c +++ b/source/blender/modifiers/intern/MOD_datatransfer.c @@ -184,7 +184,7 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes if (((result == me) || (me->mvert == result->mvert) || (me->medge == result->medge)) && (dtmd->data_types & DT_TYPES_AFFECT_MESH)) { - /* We need to duplicate data here, otherwise setting custom normals, edges' shaprness, etc., + /* We need to duplicate data here, otherwise setting custom normals, edges' sharpness, etc., * could modify org mesh, see T43671. */ BKE_id_copy_ex(NULL, &me_mod->id, (ID **)&result, LIB_ID_COPY_LOCALIZE); } diff --git a/source/blender/modifiers/intern/MOD_weighted_normal.c b/source/blender/modifiers/intern/MOD_weighted_normal.c index 84ba6a7b148..92055119298 100644 --- a/source/blender/modifiers/intern/MOD_weighted_normal.c +++ b/source/blender/modifiers/intern/MOD_weighted_normal.c @@ -360,7 +360,7 @@ static void apply_weights_vertex_normal(WeightedNormalModifierData *wnmd, } else { /* TODO: Ideally, we could add an option to BKE_mesh_normals_loop_custom_[from_vertices_]set() - * to keep current clnors instead of resetting them to default autocomputed ones, + * to keep current clnors instead of resetting them to default auto-computed ones, * when given new custom normal is zero-vec. * But this is not exactly trivial change, better to keep this optimization for later... */ |