From 73dd293ec4ffcfefae9db8e10eaaa84d4a4be4a8 Mon Sep 17 00:00:00 2001 From: Nicholas-Baron Date: Thu, 15 Apr 2021 00:36:14 -0700 Subject: Everywhere: Add `-Wdouble-promotion` warning This warning informs of float-to-double conversions. The best solution seems to be to do math *either* in 32-bit *or* in 64-bit, and only to cross over when absolutely necessary. --- Userland/Libraries/LibWeb/SVG/SVGPathElement.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Userland/Libraries/LibWeb/SVG') diff --git a/Userland/Libraries/LibWeb/SVG/SVGPathElement.cpp b/Userland/Libraries/LibWeb/SVG/SVGPathElement.cpp index a6a718aa8d..d97bc13852 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGPathElement.cpp +++ b/Userland/Libraries/LibWeb/SVG/SVGPathElement.cpp @@ -516,7 +516,7 @@ Gfx::Path& SVGPathElement::get_path() case PathInstructionType::EllipticalArc: { double rx = data[0]; double ry = data[1]; - double x_axis_rotation = data[2] * M_DEG2RAD; + double x_axis_rotation = double { data[2] } * M_DEG2RAD; double large_arc_flag = data[3]; double sweep_flag = data[4]; auto& last_point = path.segments().last().point(); -- cgit v1.2.3