From 02d31133a93bc157362251241788196da45aacce Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 2 Jul 2012 11:45:10 +0200 Subject: ARM: fix compilation with C++11 enabled C++11 makes narrowing initialisation using {}s an error. For an ARM target qreal != double, so force-cast to qreal. KAPPA now is consistent with the define of the same name in qbezier.cpp. Change-Id: I506218ee1f8cd0cdee21791cc402a479a429f7e5 Reviewed-by: Shane Kearns Reviewed-by: Sean Harmer Reviewed-by: Gunnar Sletta Reviewed-by: Thomas McGuire --- src/gui/painting/qpainterpath.cpp | 2 +- src/gui/painting/qpainterpath_p.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp index 277e019..5bc7579 100644 --- a/src/gui/painting/qpainterpath.cpp +++ b/src/gui/painting/qpainterpath.cpp @@ -2399,7 +2399,7 @@ QDataStream &operator>>(QDataStream &s, QPainterPath &p) #endif continue; } - QPainterPath::Element elm = { x, y, QPainterPath::ElementType(type) }; + QPainterPath::Element elm = { qreal(x), qreal(y), QPainterPath::ElementType(type) }; p.d_func()->elements.append(elm); } s >> p.d_func()->cStart; diff --git a/src/gui/painting/qpainterpath_p.h b/src/gui/painting/qpainterpath_p.h index e0ee047..66dd0b0 100644 --- a/src/gui/painting/qpainterpath_p.h +++ b/src/gui/painting/qpainterpath_p.h @@ -270,7 +270,7 @@ inline void QPainterPathData::maybeMoveTo() } } -#define KAPPA 0.5522847498 +#define KAPPA qreal(0.5522847498) QT_END_NAMESPACE -- cgit v0.12