[Spice-devel] [PATCH spice-common 2/6] rect: add rect_get_area
Yonit Halperin
yhalperi at redhat.com
Tue Apr 10 00:35:56 PDT 2012
On 04/08/2012 07:36 PM, Marc-André Lureau wrote:
>
>
> ----- 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.
Sorry, squashed the fix for this copy-paste bug into another patch by
mistake. Will resend.
>
>> #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