diff --git a/common/common.c b/common/common.c index 6607f95c3c..79f135a516 100644 --- a/common/common.c +++ b/common/common.c @@ -120,7 +120,7 @@ bool mp_rect_intersection(struct mp_rect *rc, const struct mp_rect *rc2) return rc->x1 > rc->x0 && rc->y1 > rc->y0; } -bool mp_rect_equals(struct mp_rect *rc1, struct mp_rect *rc2) +bool mp_rect_equals(const struct mp_rect *rc1, const struct mp_rect *rc2) { return rc1->x0 == rc2->x0 && rc1->y0 == rc2->y0 && rc1->x1 == rc2->x1 && rc1->y1 == rc2->y1; diff --git a/common/common.h b/common/common.h index 206062e8ed..93a8ded918 100644 --- a/common/common.h +++ b/common/common.h @@ -106,7 +106,7 @@ struct mp_rect { void mp_rect_union(struct mp_rect *rc, const struct mp_rect *src); bool mp_rect_intersection(struct mp_rect *rc, const struct mp_rect *rc2); bool mp_rect_contains(struct mp_rect *rc, int x, int y); -bool mp_rect_equals(struct mp_rect *rc1, struct mp_rect *rc2); +bool mp_rect_equals(const struct mp_rect *rc1, const struct mp_rect *rc2); int mp_rect_subtract(const struct mp_rect *rc1, const struct mp_rect *rc2, struct mp_rect res_array[4]);