[Webkit-unassigned] [Bug 25645] SVG - numeric overflow for very large elements

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 28 16:24:56 PDT 2010


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





--- Comment #64 from Darin Adler <darin at apple.com>  2010-07-28 16:24:56 PST ---
(In reply to comment #63)
> (From update of attachment 62869 [details])
> > +static inline int safeFloatToInt(float x)
> > +{
> > +    static int s_intMax = std::numeric_limits<int>::max();
> > +    static int s_intMin = std::numeric_limits<int>::min();
> 
> Is caching in global data really worth it? std::numeric_limits<int>::max() may just 'return MAX_INT' which is much faster than accessing global data.

Should just be static const int, and then it will not involve any global data at all in the compilers we use.

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