[Webkit-unassigned] [Bug 136809] TYPE_CASTS_BASE needs to support both for pointer and reference argument by single expression

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 16 09:03:32 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=136809





--- Comment #3 from Darin Adler <darin at apple.com>  2014-09-16 09:03:34 PST ---
(In reply to comment #2)
> Darin, there are some specific use cases of TYPE_CASTS_BASE. For example, CSS_BASIC_SHAPES_TYPE_CASTS compares argument type to predicate argument. In this case, it is hard to convert a pointer to a reference using *(X) in the macro.
> 
> #define CSS_BASIC_SHAPES_TYPE_CASTS(ToValueTypeName, predicate) \
>     TYPE_CASTS_BASE(ToValueTypeName, CSSBasicShape, basicShape, basicShape->type() == predicate, basicShape.type() == predicate) 
> 
> Any suggestion about those cases ?

I don’t see the problem you are talking about.

    a) basicShape->type() == predicate
    b) basicShape.type() == predicate
    c) (*basicShape).type() == predicate

It seems the macro could use (*x) to use the second expression only and not need (a). Maybe I could advise you on approach if you posted a partial unsuccessful attempt?

-- 
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