diff data/fileio/MIDIFileReader.cpp @ 936:0c1d6de8f44b

Merge from branch warnfix_no_size_t
author Chris Cannam
date Wed, 18 Jun 2014 13:51:16 +0100
parents 59e7fe1b1003
children 12e62865fd61
line wrap: on
line diff
--- a/data/fileio/MIDIFileReader.cpp	Tue Jun 03 11:05:49 2014 +0100
+++ b/data/fileio/MIDIFileReader.cpp	Wed Jun 18 13:51:16 2014 +0100
@@ -57,7 +57,7 @@
 
 MIDIFileReader::MIDIFileReader(QString path,
                                MIDIFileImportPreferenceAcquirer *acquirer,
-			       size_t mainModelSampleRate) :
+			       int mainModelSampleRate) :
     m_smpte(false),
     m_timingDivision(0),
     m_fps(0),
@@ -896,7 +896,7 @@
 
     if (tracksToLoad.empty()) return 0;
 
-    size_t n = tracksToLoad.size(), count = 0;
+    int n = tracksToLoad.size(), count = 0;
     Model *model = 0;
 
     for (std::set<unsigned int>::iterator i = tracksToLoad.begin();
@@ -943,10 +943,9 @@
 
     const MIDITrack &track = m_midiComposition.find(trackToLoad)->second;
 
-    size_t totalEvents = track.size();
-    size_t count = 0;
+    int totalEvents = track.size();
+    int count = 0;
 
-    bool minorKey = false;
     bool sharpKey = true;
 
     for (MIDITrack::const_iterator i = track.begin(); i != track.end(); ++i) {
@@ -968,7 +967,7 @@
 	    switch((*i)->getMetaEventCode()) {
 
 	    case MIDI_KEY_SIGNATURE:
-		minorKey = (int((*i)->getMetaMessage()[1]) != 0);
+		// minorKey = (int((*i)->getMetaMessage()[1]) != 0);
 		sharpKey = (int((*i)->getMetaMessage()[0]) >= 0);
 		break;