gallium/util: Add const to u_range_intersect
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 5 Apr 2019 18:52:59 +0000 (11:52 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sun, 7 Apr 2019 07:21:12 +0000 (00:21 -0700)
This doesn't modify the range, so it can accept a const pointer.

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
src/gallium/auxiliary/util/u_range.h

index 7d3fc61aa328e2c2c44dc63f9c647d5de67fe30f..cbf855a2c573546b6d99deb69ad0d6e0233bf1a9 100644 (file)
@@ -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);
 }