diff layer/RegionLayer.cpp @ 805:1d526ba11a24 warnfix_no_size_t

Remove size_t's and fix warnings in layer/
author Chris Cannam
date Tue, 17 Jun 2014 15:18:06 +0100
parents 137d3ff48f73
children f84f1828420b
line wrap: on
line diff
--- a/layer/RegionLayer.cpp	Tue Jun 03 11:10:52 2014 +0100
+++ b/layer/RegionLayer.cpp	Tue Jun 17 15:18:06 2014 +0100
@@ -367,7 +367,7 @@
 }
 
 QString
-RegionLayer::getLabelPreceding(size_t frame) const
+RegionLayer::getLabelPreceding(int frame) const
 {
     if (!m_model) return "";
     RegionModel::PointList points = m_model->getPreviousPoints(frame);
@@ -450,7 +450,7 @@
 
 bool
 RegionLayer::snapToFeatureFrame(View *v, int &frame,
-                                size_t &resolution,
+                                int &resolution,
                                 SnapType snap) const
 {
     if (!m_model) {
@@ -533,7 +533,7 @@
 
 bool
 RegionLayer::snapToSimilarFeature(View *v, int &frame,
-                                  size_t &resolution,
+                                  int &resolution,
                                   SnapType snap) const
 {
     if (!m_model) {
@@ -901,7 +901,6 @@
     //!!! coord is never completely flat on the top or bottom
 
     int fontHeight = paint.fontMetrics().height();
-    int fontAscent = paint.fontMetrics().ascent();
 
     for (RegionModel::PointList::const_iterator i = points.begin();
 	 i != points.end(); ++i) {
@@ -1076,7 +1075,6 @@
     bool logarithmic;
 
     int w = getVerticalScaleWidth(v, false, paint);
-    int h = v->height();
 
     if (m_plotStyle == PlotSegmentation) {
 
@@ -1192,7 +1190,7 @@
 }
 
 void
-RegionLayer::eraseDrag(View *v, QMouseEvent *e)
+RegionLayer::eraseDrag(View *, QMouseEvent *)
 {
 }
 
@@ -1279,7 +1277,7 @@
 }
 
 void
-RegionLayer::editEnd(View *, QMouseEvent *e)
+RegionLayer::editEnd(View *, QMouseEvent *)
 {
     if (!m_model || !m_editing) return;
 
@@ -1348,7 +1346,7 @@
 }
 
 void
-RegionLayer::moveSelection(Selection s, size_t newStartFrame)
+RegionLayer::moveSelection(Selection s, int newStartFrame)
 {
     if (!m_model) return;
 
@@ -1455,7 +1453,7 @@
 }
 
 bool
-RegionLayer::paste(View *v, const Clipboard &from, int frameOffset, bool /* interactive */)
+RegionLayer::paste(View *v, const Clipboard &from, int /* frameOffset */, bool /* interactive */)
 {
     if (!m_model) return false;
 
@@ -1487,7 +1485,7 @@
          i != points.end(); ++i) {
         
         if (!i->haveFrame()) continue;
-        size_t frame = 0;
+        int frame = 0;
 
         if (!realign) {
             
@@ -1511,7 +1509,7 @@
                                m_model->getValueMaximum()) / 2;
         if (i->haveDuration()) newPoint.duration = i->getDuration();
         else {
-            size_t nextFrame = frame;
+            int nextFrame = frame;
             Clipboard::PointList::const_iterator j = i;
             for (; j != points.end(); ++j) {
                 if (!j->haveFrame()) continue;