[cairo] [PATCH 10/51] core: fixed code duplication

Enrico Weigelt, metux IT consult enrico.weigelt at gr13.net
Tue Dec 22 15:07:55 PST 2015


On 22.12.2015 23:37, Bryce Harrington wrote:

Hi,

> I think he's referring to the lack of a space after the if.

okay, already fixed that. also replaced the whitespaces in comments
by tabs.

by the way: should we perhaps let tools like astyle do these checks ?

>> we could also check for both:
>>
>>      ((clip->boxes == NULL) || (clip->num_boxes == 0))
>>
>> I'd guess the compiler could generate a vector op for that, if the
>> fields are direct neighbors and properly aligned.
> 
> I suppose.  What you had looked ok to me, but I'll never argue against
> adding asserts().

okay, should I add asserts whereever I make any assumptions ?
(eg. also everywhere I dereference pointers, which arent checked
explicitly)


--mtx


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


More information about the cairo mailing list