[Webkit-unassigned] [Bug 33189] scaleEmToUnits in SimpleFontDataMac.mm does an unnecessary division

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 4 18:01:48 PST 2010


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





--- Comment #5 from Darin Adler <darin at apple.com>  2010-01-04 18:01:48 PST ---
(From update of attachment 45849)
> -static inline float scaleEmToUnits(float x, unsigned unitsPerEm) { return x * (contextDPI / (contextDPI * unitsPerEm)); }
> +static inline float scaleEmToUnits(float x, unsigned unitsPerEm) { return x / static_cast<float>(unitsPerEm); }

Why the static_cast<float>? As far as I know, C will do a float / unsigned just
fine, and return a float without any cast.

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