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 /source/blender/editors | |
parent | f874f6817d1c793da4fd423a3c8bf0e504ebfa4a (diff) |
Cleanup: pass const variables
Diffstat (limited to 'source/blender/editors')
-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 |
5 files changed, 12 insertions, 11 deletions
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], |