[Webkit-unassigned] [Bug 62168] error: converting 'false' to pointer type when compiling with gcc-4.6.0
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Aug 18 11:51:45 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=62168
Darin Adler <darin at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #104373|review?, commit-queue? |review+, commit-queue-
Flag| |
--- Comment #23 from Darin Adler <darin at apple.com> 2011-08-18 11:51:45 PST ---
(From update of attachment 104373)
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.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list