summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrediano Ziglio <freddy77@gmail.com>2020-06-18 20:08:13 +0100
committerFrediano Ziglio <freddy77@gmail.com>2020-06-25 16:17:39 +0100
commitba7af04f6508250982e56e0285f05864bd8a03a1 (patch)
tree68edbf80f7090e9506e93d1673108aaae6525f1e
parent5d8feeb19a110c915970acf1a15d9a6d8b8f862c (diff)
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 <freddy77@gmail.com> Acked-by: Francesco Giudici <fgiudici@redhat.com>
-rw-r--r--common/rect.h10
1 files 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)