[cairo] [PATCH 12/72] core: helper funtion for initializing rects with zero

Enrico Weigelt, metux IT consult enrico.weigelt at gr13.net
Tue Dec 29 07:31:46 PST 2015


On 29.12.2015 15:19, Chris Wilson wrote:
>> --- a/src/cairoint.h
>> +++ b/src/cairoint.h
>> @@ -327,6 +327,12 @@ _cairo_unbounded_rectangle_init (cairo_rectangle_int_t *rect)
>>      *rect = _cairo_unbounded_rectangle;
>>  }
>>  
>> +static inline void
>> +_cairo_zero_rectangle_init (cairo_rectangle_int_t *rect)
>> +{
>> +    *rect = (cairo_rectangle_int_t){ 0 };
>> +}
> 
> Anonymous structs are not available on all the compilers we support (we
> expect to still compile on old school SunOS!)

hmm, i dont see any anonymous struct here - just a zero initializer.

--mtx

--
Enrico Weigelt,
metux IT consulting
+49-151-27565287


More information about the cairo mailing list