[webkit-reviews] review granted: [Bug 62168] error: converting 'false' to pointer type when compiling with gcc-4.6.0 : [Attachment 104373] Addressed comments.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 18 11:51:44 PDT 2011


Darin Adler <darin at apple.com> has granted asharif.tools at gmail.com's request for
review:
Bug 62168: error: converting 'false' to pointer type when compiling with
gcc-4.6.0
https://bugs.webkit.org/show_bug.cgi?id=62168

Attachment 104373: Addressed comments.
https://bugs.webkit.org/attachment.cgi?id=104373&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=104373&action=review


>> Source/WebCore/ChangeLog:1
>> +2011-08-11	Ahmad Sharif  <asharif at chromium.org>
> 
> ChangeLog entry has no bug number  [changelog/bugnumber] [5]

Need to fix this.

> Source/WebCore/dom/Element.cpp:1100
> +    bool hasParentStyle = parentNodeForRenderingAndStyle() ?
static_cast<bool>(parentNodeForRenderingAndStyle()->renderStyle()) : false;

I think it would be slightly more elegant to do something like "!!" rather than
static_cast<bool>; not really sure.

A much clearer way to write it would be to add a hasStyle function to
RenderObject* that encapsulates this. Or even just a local helper function
called hasStyle.

Generally speaking, casts are harder to read than almost any alternative.


More information about the webkit-reviews mailing list