diff options
author | Marc-André Lureau <marcandre.lureau@gmail.com> | 2013-10-04 12:45:00 +0200 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@gmail.com> | 2013-10-04 12:45:00 +0200 |
commit | 7e8ba10779a3fb11d587e8a59fe389acd2412dd0 (patch) | |
tree | a6af47e3fcca0fe0e0209d2720dbedeb656d31a2 /common/rect.h | |
parent | e443c9f6039407633d38a0eba03c344272ac8559 (diff) | |
download | spice-common-7e8ba10779a3fb11d587e8a59fe389acd2412dd0.tar.gz spice-common-7e8ba10779a3fb11d587e8a59fe389acd2412dd0.tar.xz spice-common-7e8ba10779a3fb11d587e8a59fe389acd2412dd0.zip |
Remove INLINE usage
Since inline is c99 and its already used in some files
Diffstat (limited to 'common/rect.h')
-rw-r--r-- | common/rect.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/common/rect.h b/common/rect.h index f8bacf1..8c9faed 100644 --- a/common/rect.h +++ b/common/rect.h @@ -25,7 +25,7 @@ SPICE_BEGIN_DECLS -static INLINE void rect_sect(SpiceRect* r, const SpiceRect* bounds) +static inline void rect_sect(SpiceRect* r, const SpiceRect* bounds) { r->left = MAX(r->left, bounds->left); r->right = MIN(r->right, bounds->right); @@ -36,7 +36,7 @@ static INLINE void rect_sect(SpiceRect* r, const SpiceRect* bounds) r->bottom = MAX(r->top, r->bottom); } -static INLINE void rect_offset(SpiceRect* r, int dx, int dy) +static inline void rect_offset(SpiceRect* r, int dx, int dy) { r->left += dx; r->right += dx; @@ -44,24 +44,24 @@ static INLINE void rect_offset(SpiceRect* r, int dx, int dy) r->bottom += dy; } -static INLINE int rect_is_empty(const SpiceRect* r) +static inline int rect_is_empty(const SpiceRect* r) { return r->top == r->bottom || r->left == r->right; } -static INLINE int rect_intersects(const SpiceRect* r1, const SpiceRect* r2) +static inline int rect_intersects(const SpiceRect* r1, const SpiceRect* r2) { return r1->left < r2->right && r1->right > r2->left && r1->top < r2->bottom && r1->bottom > r2->top; } -static INLINE int rect_is_equal(const SpiceRect *r1, const SpiceRect *r2) +static inline int rect_is_equal(const SpiceRect *r1, const SpiceRect *r2) { return r1->top == r2->top && r1->left == r2->left && r1->bottom == r2->bottom && r1->right == r2->right; } -static INLINE void rect_union(SpiceRect *dest, const SpiceRect *r) +static inline void rect_union(SpiceRect *dest, const SpiceRect *r) { dest->top = MIN(dest->top, r->top); dest->left = MIN(dest->left, r->left); @@ -69,24 +69,24 @@ static INLINE void rect_union(SpiceRect *dest, const SpiceRect *r) dest->right = MAX(dest->right, r->right); } -static INLINE int rect_is_same_size(const SpiceRect *r1, const SpiceRect *r2) +static inline int rect_is_same_size(const SpiceRect *r1, const SpiceRect *r2) { return r1->right - r1->left == r2->right - r2->left && 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, const SpiceRect *small) { return big->left <= small->left && big->right >= small->right && big->top <= small->top && big->bottom >= small->bottom; } -static INLINE int rect_get_area(const SpiceRect *r) +static inline int rect_get_area(const SpiceRect *r) { return (r->right - r->left) * (r->bottom - r->top); } -static INLINE void rect_debug(const SpiceRect *r) +static inline void rect_debug(const SpiceRect *r) { spice_debug("(%d, %d) (%d, %d)", r->left, r->top, r->right, r->bottom); } |