Added cast to qreal, avoiding ftbfs due to issue #758
authorGianfranco Costamagna <costamagnagianfranco@yahoo.it>
Tue, 07 Jan 2014 11:40:58 +0100
changeset 9949 2aa9cf5badfc
parent 9947 ff4e56775e9c
child 10002 29acde6f200c
Added cast to qreal, avoiding ftbfs due to issue #758 More explanation here https://wiki.debian.org/ArmEabiFixes And on qt-project.org reference website: "Typedef for double on all platforms except for those using CPUs with ARM architectures. On ARM-based platforms, qreal is a typedef for float for performance reasons."
QTfrontend/drawmapscene.cpp
--- a/QTfrontend/drawmapscene.cpp	Sat Jan 04 02:41:23 2014 +0100
+++ b/QTfrontend/drawmapscene.cpp	Tue Jan 07 11:40:58 2014 +0100
@@ -459,7 +459,7 @@
         l.append(center);
     } else
     {
-        qreal angleDelta = qMax(0.1, qMin(0.7, 120 / r));
+        qreal angleDelta = qMax(static_cast<qreal> (0.1), qMin(static_cast<qreal> (0.7), 120 / r));
         for(qreal angle = 0.0; angle < 2*M_PI; angle += angleDelta)
             l.append(center + QPointF(rx * cos(angle), ry * sin(angle)));
         l.append(l.first());