[Bf-blender-cvs] [8cd6e22ec0c] master: Cleanup: use const arg for BLI_rect inside check

Campbell Barton noreply at git.blender.org
Tue Sep 4 09:24:52 CEST 2018


Commit: 8cd6e22ec0c1eace9107e7425abc00e9938b26c8
Author: Campbell Barton
Date:   Tue Sep 4 17:33:12 2018 +1000
Branches: master
https://developer.blender.org/rB8cd6e22ec0c1eace9107e7425abc00e9938b26c8

Cleanup: use const arg for BLI_rect inside check

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

M	source/blender/blenlib/BLI_rect.h
M	source/blender/blenlib/intern/rct.c

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

diff --git a/source/blender/blenlib/BLI_rect.h b/source/blender/blenlib/BLI_rect.h
index 471d875c9af..a6670266643 100644
--- a/source/blender/blenlib/BLI_rect.h
+++ b/source/blender/blenlib/BLI_rect.h
@@ -92,8 +92,8 @@ bool BLI_rcti_isect_segment(const struct rcti *rect, const int s1[2], const int
 bool BLI_rctf_isect_segment(const struct rctf *rect, const float s1[2], const float s2[2]);
 bool BLI_rcti_isect_circle(const struct rcti *rect, const float xy[2], const float radius);
 bool BLI_rctf_isect_circle(const struct rctf *rect, const float xy[2], const float radius);
-bool BLI_rcti_inside_rcti(rcti *rct_a, const rcti *rct_b);
-bool BLI_rctf_inside_rctf(rctf *rct_a, const rctf *rct_b);
+bool BLI_rcti_inside_rcti(const rcti *rct_a, const rcti *rct_b);
+bool BLI_rctf_inside_rctf(const rctf *rct_a, const rctf *rct_b);
 void BLI_rcti_union(struct rcti *rcti1, const struct rcti *rcti2);
 void BLI_rctf_union(struct rctf *rctf1, const struct rctf *rctf2);
 void BLI_rcti_rctf_copy(struct rcti *dst, const struct rctf *src);
diff --git a/source/blender/blenlib/intern/rct.c b/source/blender/blenlib/intern/rct.c
index 764b12431d0..e0d92e8a19f 100644
--- a/source/blender/blenlib/intern/rct.c
+++ b/source/blender/blenlib/intern/rct.c
@@ -161,14 +161,14 @@ float BLI_rctf_length_y(const rctf *rect, const float y)
 /**
  * is \a rct_b inside \a rct_a
  */
-bool BLI_rctf_inside_rctf(rctf *rct_a, const rctf *rct_b)
+bool BLI_rctf_inside_rctf(const rctf *rct_a, const rctf *rct_b)
 {
 	return ((rct_a->xmin <= rct_b->xmin) &&
 	        (rct_a->xmax >= rct_b->xmax) &&
 	        (rct_a->ymin <= rct_b->ymin) &&
 	        (rct_a->ymax >= rct_b->ymax));
 }
-bool BLI_rcti_inside_rcti(rcti *rct_a, const rcti *rct_b)
+bool BLI_rcti_inside_rcti(const rcti *rct_a, const rcti *rct_b)
 {
 	return ((rct_a->xmin <= rct_b->xmin) &&
 	        (rct_a->xmax >= rct_b->xmax) &&



More information about the Bf-blender-cvs mailing list