summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2019-04-05 11:52:59 -0700
committerKenneth Graunke <[email protected]>2019-04-07 00:21:12 -0700
commit4e802089bcfa278f414fb3a0ce5879d840526691 (patch)
tree086eecad02db0447a549b2c1acc656d2d5f51ceb /src
parentc5a6e72e15b67b37e5b2e35721261ec3da60c045 (diff)
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 <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/util/u_range.h3
1 files changed, 2 insertions, 1 deletions
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);
}