From 8cd6e22ec0c1eace9107e7425abc00e9938b26c8 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 4 Sep 2018 17:33:12 +1000 Subject: Cleanup: use const arg for BLI_rect inside check --- source/blender/blenlib/BLI_rect.h | 4 ++-- source/blender/blenlib/intern/rct.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/blenlib') 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) && -- cgit v1.2.3