swc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/swc
Log | Files | Refs | README | LICENSE

commit 75b42b770d9ac621d3741e42fe46a5e7f1688ff5
parent 711ff873deb128c5ad8bd6d510d212c017744fc2
Author: Michael Forney <mforney@mforney.org>
Date:   Fri,  6 Dec 2013 16:02:44 -0800

Use const rectangles

Diffstat:
Mlibswc/util.h | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libswc/util.h b/libswc/util.h @@ -59,14 +59,14 @@ static inline uint32_t swc_time() extern pixman_box32_t infinite_extents; static inline bool swc_rectangle_contains_point - (pixman_rectangle32_t * rectangle, int32_t x, int32_t y) + (const pixman_rectangle32_t * rectangle, int32_t x, int32_t y) { return x > rectangle->x && x < rectangle->x + rectangle->width && y > rectangle->y && y < rectangle->y + rectangle->height; } static inline bool swc_rectangle_overlap - (pixman_rectangle32_t * r1, pixman_rectangle32_t * r2) + (const pixman_rectangle32_t * r1, const pixman_rectangle32_t * r2) { return (MAX(r1->x + r1->width, r2->x + r2->width) - MIN(r1->x, r2->x) < r1->width + r2->width)