changeset 1454:743c38b209d0

Fix compiler warnings
author Chris Cannam
date Tue, 17 Apr 2018 10:54:48 +0100
parents 4b496a258782
children ec9e65fcf749
files data/fileio/CSVStreamWriter.h data/fileio/test/CSVStreamWriterTest.h
diffstat 2 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/data/fileio/CSVStreamWriter.h	Tue Apr 17 10:52:06 2018 +0100
+++ b/data/fileio/CSVStreamWriter.h	Tue Apr 17 10:54:48 2018 +0100
@@ -80,7 +80,8 @@
             }
 
             nFramesWritten += end - start;
-            const auto currentProgress = 100 * nFramesWritten / nFramesToWrite;
+            const int currentProgress =
+                int(100 * nFramesWritten / nFramesToWrite);
             const bool hasIncreased = currentProgress > previousProgress;
             if (hasIncreased) {
                 if (reporter) reporter->setProgress(currentProgress);
--- a/data/fileio/test/CSVStreamWriterTest.h	Tue Apr 17 10:52:06 2018 +0100
+++ b/data/fileio/test/CSVStreamWriterTest.h	Tue Apr 17 10:54:48 2018 +0100
@@ -256,7 +256,7 @@
         regions.addSelection({0, 2});
         regions.addSelection({4, 6});
         regions.addSelection({16, 18});
-        qDebug("End frame: %lld", mwm.getEndFrame());
+        qDebug("End frame: %lld", (long long int)mwm.getEndFrame());
         const std::string expectedOutput {
           "0,0,0\n"
           "1,0,0\n"
@@ -307,7 +307,7 @@
 
         StubReporter reporter { []() -> bool { return false; } };
         std::ostringstream oss;
-        qDebug("End frame: %lld", notes.getEndFrame());
+        qDebug("End frame: %lld", (long long int)notes.getEndFrame());
         qDebug("Write streaming\n");
         const auto wroteSparseModel = CSVStreamWriter::writeInChunks(
             oss,
@@ -325,4 +325,4 @@
     }
 };
 
-#endif
\ No newline at end of file
+#endif