From 4e802089bcfa278f414fb3a0ce5879d840526691 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 5 Apr 2019 11:52:59 -0700 Subject: gallium/util: Add const to u_range_intersect This doesn't modify the range, so it can accept a const pointer. Reviewed-by: Eric Engestrom --- src/gallium/auxiliary/util/u_range.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gallium/auxiliary/util/u_range.h') diff --git a/src/gallium/auxiliary/util/u_range.h b/src/gallium/auxiliary/util/u_range.h index 7d3fc61aa32..cbf855a2c57 100644 --- a/src/gallium/auxiliary/util/u_range.h +++ b/src/gallium/auxiliary/util/u_range.h @@ -67,7 +67,8 @@ util_range_add(struct util_range *range, unsigned start, unsigned end) } static inline boolean -util_ranges_intersect(struct util_range *range, unsigned start, unsigned end) +util_ranges_intersect(const struct util_range *range, + unsigned start, unsigned end) { return MAX2(start, range->start) < MIN2(end, range->end); } -- cgit v1.2.3