From: Kenneth Graunke Date: Fri, 5 Apr 2019 18:52:59 +0000 (-0700) Subject: gallium/util: Add const to u_range_intersect X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4e802089bcfa278f414fb3a0ce5879d840526691;p=mesa.git 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 --- 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); }