diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2023-08-25 18:56:41 +0200 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-08-31 17:37:42 +0000 |
commit | 8920ee59449192005a78f9b1af02b7412d955b9d (patch) | |
tree | c88d684fce07d333299ff55c3ce61f587f26160f /common | |
parent | 3ab5401b38d1ff1c1bb85f108f26d508cc334c82 (diff) | |
download | mpv-8920ee59449192005a78f9b1af02b7412d955b9d.tar.bz2 mpv-8920ee59449192005a78f9b1af02b7412d955b9d.tar.xz |
common: constify mp_rect_equals
Diffstat (limited to 'common')
-rw-r--r-- | common/common.c | 2 | ||||
-rw-r--r-- | common/common.h | 2 |
2 files changed, 2 insertions, 2 deletions
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]); |