Compile when qreal is not a double
authorGunnar Sletta <gunnar.sletta@nokia.com>
Mon, 20 Jun 2011 10:21:33 +0000 (12:21 +0200)
committerGunnar Sletta <gunnar.sletta@nokia.com>
Mon, 20 Jun 2011 12:19:17 +0000 (14:19 +0200)
src/declarative/particles/qsgpointattractor.cpp

index 4c67523..0a893f7 100644 (file)
@@ -60,11 +60,11 @@ bool QSGPointAttractorAffector::affectParticle(QSGParticleData *d, qreal dt)
     qreal ds = 0;
     switch(m_proportionalToDistance){
     case Quadratic:
-        ds = (m_strength / qMax(1.,r*r)) * dt;
+        ds = (m_strength / qMax<qreal>(1.,r*r)) * dt;
         break;
     case Linear://also default
     default:
-        ds = (m_strength / qMax(1.,r)) * dt;
+        ds = (m_strength / qMax<qreal>(1.,r)) * dt;
     }
     dx = ds * cos(theta);
     dy = ds * sin(theta);