[Webkit-unassigned] [Bug 142673] [GTK] Add settings to set font size in points, and deprecate the pixel size settings

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 31 09:25:34 PDT 2017


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

--- Comment #26 from Gabriel Ivașcu <givascu at igalia.com> ---
(In reply to Michael Catanzaro from comment #25)
> (In reply to Gabriel Ivașcu from comment #24)
> > Since there's no overload of std::hypot that takes two ints, I wasn't sure
> > which version of std::hypot C++ will call. We'd prefer the one that has
> > doubles for parameters for reasons of precision, so that's why I added the
> > casts.
> 
> cppreference is your friend:
> 
> http://en.cppreference.com/w/cpp/numeric/math/hypot
> 
> I think, without the casts, you'll get the fourth overload, since it's being
> called with int parameters. And that says:
> 
> "4) A set of overloads or a function template for all combinations of
> arguments of arithmetic type not covered by (1-3). If any argument has
> integral type, it is cast to double. If any other argument is long double,
> then the return type is long double, otherwise it is double."
> 
> so it will be double even without the casts, and the casts aren't needed.
> Could you check?

Yes, you're right, I was going to comment on this myself. The integral types are converted to double by default, so there's no need for explicit conversion.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20171031/837c9f2f/attachment-0001.html>


More information about the webkit-unassigned mailing list