From ba7af04f6508250982e56e0285f05864bd8a03a1 Mon Sep 17 00:00:00 2001 From: Frediano Ziglio Date: Thu, 18 Jun 2020 20:08:13 +0100 Subject: rect: Avoid usage of "small" Some Windows headers define "small" causing issues. Use "small_rect" instead. For coherence use "big_rect" instead of "big". Signed-off-by: Frediano Ziglio Acked-by: Francesco Giudici --- common/rect.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/common/rect.h b/common/rect.h index c3920e2..950b23b 100644 --- a/common/rect.h +++ b/common/rect.h @@ -75,10 +75,10 @@ static inline int rect_is_same_size(const SpiceRect *r1, const SpiceRect *r2) r1->bottom - r1->top == r2->bottom - r2->top; } -static inline int rect_contains(const SpiceRect *big, const SpiceRect *small) +static inline int rect_contains(const SpiceRect *big_rect, const SpiceRect *small_rect) { - return big->left <= small->left && big->right >= small->right && - big->top <= small->top && big->bottom >= small->bottom; + return big_rect->left <= small_rect->left && big_rect->right >= small_rect->right && + big_rect->top <= small_rect->top && big_rect->bottom >= small_rect->bottom; } static inline int rect_get_area(const SpiceRect *r) @@ -130,9 +130,9 @@ static inline int rect_is_same_size(const SpiceRect& r1, const SpiceRect& r2) return rect_is_same_size(&r1, &r2); } -static inline int rect_contains(const SpiceRect& big, const SpiceRect& small) +static inline int rect_contains(const SpiceRect& big_rect, const SpiceRect& small_rect) { - return rect_contains(&big, &small); + return rect_contains(&big_rect, &small_rect); } static inline int rect_get_area(const SpiceRect& r) -- cgit v1.2.3