diff data/fileio/CSVFileReader.cpp @ 929:59e7fe1b1003 warnfix_no_size_t

Unsigned removals and warning fixes in data/
author Chris Cannam
date Tue, 17 Jun 2014 14:33:42 +0100
parents 69cc0454ed72
children fae5689f7e27
line wrap: on
line diff
--- a/data/fileio/CSVFileReader.cpp	Tue Jun 17 13:52:07 2014 +0100
+++ b/data/fileio/CSVFileReader.cpp	Tue Jun 17 14:33:42 2014 +0100
@@ -35,7 +35,7 @@
 #include <map>
 
 CSVFileReader::CSVFileReader(QString path, CSVFormat format,
-                             size_t mainModelSampleRate) :
+                             int mainModelSampleRate) :
     m_format(format),
     m_file(0),
     m_warnings(0),
@@ -81,16 +81,16 @@
     return m_error;
 }
 
-size_t
-CSVFileReader::convertTimeValue(QString s, int lineno, size_t sampleRate,
-                                size_t windowSize) const
+int
+CSVFileReader::convertTimeValue(QString s, int lineno, int sampleRate,
+                                int windowSize) const
 {
     QRegExp nonNumericRx("[^0-9eE.,+-]");
     int warnLimit = 10;
 
     CSVFormat::TimeUnits timeUnits = m_format.getTimeUnits();
 
-    size_t calculatedFrame = 0;
+    int calculatedFrame = 0;
 
     bool ok = false;
     QString numeric = s;
@@ -135,8 +135,8 @@
     CSVFormat::ModelType modelType = m_format.getModelType();
     CSVFormat::TimingType timingType = m_format.getTimingType();
     CSVFormat::TimeUnits timeUnits = m_format.getTimeUnits();
-    size_t sampleRate = m_format.getSampleRate();
-    size_t windowSize = m_format.getWindowSize();
+    int sampleRate = m_format.getSampleRate();
+    int windowSize = m_format.getWindowSize();
     QChar separator = m_format.getSeparator();
     bool allowQuoting = m_format.getAllowQuoting();
 
@@ -169,15 +169,15 @@
 
     float min = 0.0, max = 0.0;
 
-    size_t frameNo = 0;
-    size_t duration = 0;
-    size_t endFrame = 0;
+    int frameNo = 0;
+    int duration = 0;
+    int endFrame = 0;
 
     bool haveAnyValue = false;
     bool haveEndTime = false;
     bool pitchLooksLikeMIDI = true;
 
-    size_t startFrame = 0; // for calculation of dense model resolution
+    int startFrame = 0; // for calculation of dense model resolution
     bool firstEverValue = true;
 
     std::map<QString, int> labelCountMap;