diff layer/LinearNumericalScale.cpp @ 905:b66fb15de477 cxx11

Working through the float/double and int/sv_frame_t fixes
author Chris Cannam
date Mon, 09 Mar 2015 14:35:21 +0000
parents e0f08e108064
children 4fe7a09be0fe
line wrap: on
line diff
--- a/layer/LinearNumericalScale.cpp	Mon Mar 09 12:02:10 2015 +0000
+++ b/layer/LinearNumericalScale.cpp	Mon Mar 09 14:35:21 2015 +0000
@@ -47,13 +47,13 @@
 
     int w = getWidth(v, paint) + x0;
 
-    double round = 1.f;
+    double round = 1.0;
     int dp = 0;
     if (inc > 0) {
-        int prec = trunc(log10f(inc));
+        int prec = int(trunc(log10(inc)));
         prec -= 1;
         if (prec < 0) dp = -prec;
-        round = powf(10.f, prec);
+        round = pow(10.0, prec);
 #ifdef DEBUG_TIME_VALUE_LAYER
         cerr << "inc = " << inc << ", round = " << round << ", dp = " << dp << endl;
 #endif
@@ -72,7 +72,7 @@
 	    v->height() < paint.fontMetrics().height() * (n*2)) {
 	    if (layer->getScaleUnits() != "") drawText = false;
 	}
-	dispval = lrintf(val / round) * round;
+	dispval = int(rint(val / round) * round);
 
 #ifdef DEBUG_TIME_VALUE_LAYER
 	cerr << "val = " << val << ", dispval = " << dispval << endl;