[Webkit-unassigned] [Bug 61612] Clean up CSSPrimitiveValue::computeLength*

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun May 29 22:58:11 PDT 2011


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





--- Comment #4 from Luke Macpherson <macpherson at chromium.org>  2011-05-29 22:58:10 PST ---
Hi Eric, I'm not sure if I understand you. There is no generic implementation of computeLength, just type specific implementations. All I'm doing is moving that type information out of the function name and into a type parameter.

I think that's a good thing on it's own merits, but the advantage becomes that I can then have a templated class:

template <typename T>
class Foo {
    virtual void bar() {
       CSSPrimitiveValue v = ...;
       T baz = v.computeLength<typename T>(...);
    }
}

This is handy for eliminating code that would otherwise require separate implementations of Foo for each type.

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