diff layer/Layer.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 4a578a360011
line wrap: on
line diff
--- a/layer/Layer.cpp	Mon Mar 09 12:02:10 2015 +0000
+++ b/layer/Layer.cpp	Mon Mar 09 14:35:21 2015 +0000
@@ -250,12 +250,12 @@
         // reference (i.e. having been copied from the reference
         // model).
         
-        int sourceFrame = i->getFrame();
-        int referenceFrame = sourceFrame;
+        sv_frame_t sourceFrame = i->getFrame();
+        sv_frame_t referenceFrame = sourceFrame;
         if (i->haveReferenceFrame()) {
             referenceFrame = i->getReferenceFrame();
         }
-        int myMappedFrame = alignToReference(v, sourceFrame);
+        sv_frame_t myMappedFrame = alignToReference(v, sourceFrame);
 
 //        cerr << "sourceFrame = " << sourceFrame << ", referenceFrame = " << referenceFrame << " (have = " << i->haveReferenceFrame() << "), myMappedFrame = " << myMappedFrame << endl;
 
@@ -470,8 +470,8 @@
 void
 Layer::updateMeasurePixrects(View *v) const
 {
-    int sf = v->getStartFrame();
-    int ef = v->getEndFrame();
+    sv_frame_t sf = v->getStartFrame();
+    sv_frame_t ef = v->getEndFrame();
 
     for (MeasureRectSet::const_iterator i = m_measureRects.begin(); 
          i != m_measureRects.end(); ++i) {
@@ -509,8 +509,8 @@
 void
 Layer::updateMeasureRectYCoords(View *v, const MeasureRect &r) const
 {
-    int y0 = lrint(r.startY * v->height());
-    int y1 = lrint(r.endY * v->height());
+    int y0 = int(lrint(r.startY * v->height()));
+    int y1 = int(lrint(r.endY * v->height()));
     r.pixrect = QRect(r.pixrect.x(), y0, r.pixrect.width(), y1 - y0);
 }