[Spice-devel] [PATCH spice-common 2/6] rect: add rect_get_area
Marc-André Lureau
mlureau at redhat.com
Sun Apr 8 09:36:27 PDT 2012
----- Mensaje original -----
>
> Signed-off-by: Yonit Halperin <yhalperi at redhat.com>
> ---
> common/rect.h | 10 ++++++++++
> 1 files changed, 10 insertions(+), 0 deletions(-)
>
> diff --git a/common/rect.h b/common/rect.h
> index 655e9e8..0e4b01e 100644
> --- a/common/rect.h
> +++ b/common/rect.h
> @@ -80,6 +80,11 @@ static INLINE int rect_contains(const SpiceRect
> *big, const SpiceRect *small)
> big->top <= small->top && big->bottom >= small->bottom;
> }
>
> +static INLINE int rect_get_area(const SpiceRect *r)
> +{
> + return (r->right - r->left) * (r->bottom - r->top);
> +}
> +
> SPICE_END_DECLS
>
> #ifdef __cplusplus
> @@ -124,6 +129,11 @@ static inline int rect_contains(const SpiceRect&
> big, const SpiceRect& small)
> return rect_contains(&big, &small);
> }
>
> +static inline int rect_get_area(const SpiceRect& r)
> +{
> + return rect_contains(&r);
> +}
Looks like a typo.
> #endif /* __cplusplus */
>
> #endif
> --
> 1.7.7.6
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>
More information about the Spice-devel
mailing list