diff layer/TimeInstantLayer.cpp @ 908:4a578a360011 cxx11

More type fixes
author Chris Cannam
date Tue, 10 Mar 2015 13:22:10 +0000
parents 1d526ba11a24
children 251dd0abc7b7
line wrap: on
line diff
--- a/layer/TimeInstantLayer.cpp	Tue Mar 10 10:31:27 2015 +0000
+++ b/layer/TimeInstantLayer.cpp	Tue Mar 10 13:22:10 2015 +0000
@@ -249,7 +249,7 @@
 }
 
 bool
-TimeInstantLayer::snapToFeatureFrame(View *v, int &frame,
+TimeInstantLayer::snapToFeatureFrame(View *v, sv_frame_t &frame,
 				     int &resolution,
 				     SnapType snap) const
 {
@@ -269,7 +269,7 @@
     }    
 
     points = m_model->getPoints(frame, frame);
-    int snapped = frame;
+    sv_frame_t snapped = frame;
     bool found = false;
 
     for (SparseOneDimensionalModel::PointList::const_iterator i = points.begin();
@@ -666,7 +666,7 @@
 }
 
 void
-TimeInstantLayer::moveSelection(Selection s, int newStartFrame)
+TimeInstantLayer::moveSelection(Selection s, sv_frame_t newStartFrame)
 {
     if (!m_model) return;
 
@@ -712,9 +712,9 @@
 
 	if (s.contains(i->frame)) {
 
-	    double target = i->frame;
-	    target = newSize.getStartFrame() + 
-		double(target - s.getStartFrame()) * ratio;
+	    double target = double(i->frame);
+	    target = double(newSize.getStartFrame()) +
+		target - double(s.getStartFrame()) * ratio;
 
 	    SparseOneDimensionalModel::Point newPoint(*i);
 	    newPoint.frame = lrint(target);
@@ -765,7 +765,7 @@
 }
 
 bool
-TimeInstantLayer::paste(View *v, const Clipboard &from, int frameOffset, bool)
+TimeInstantLayer::paste(View *v, const Clipboard &from, sv_frame_t frameOffset, bool)
 {
     if (!m_model) return false;
 
@@ -798,7 +798,7 @@
         
         if (!i->haveFrame()) continue;
 
-        int frame = 0;
+        sv_frame_t frame = 0;
 
         if (!realign) {