diff data/model/ReadOnlyWaveFileModel.cpp @ 1582:70e172e6cc59 fix-static-analysis

Use nullptr throughout
author Chris Cannam
date Mon, 26 Nov 2018 14:33:41 +0000
parents d93e34684da7
children 77543124651b
line wrap: on
line diff
--- a/data/model/ReadOnlyWaveFileModel.cpp	Mon Nov 26 13:51:36 2018 +0000
+++ b/data/model/ReadOnlyWaveFileModel.cpp	Mon Nov 26 14:33:41 2018 +0000
@@ -42,11 +42,11 @@
 ReadOnlyWaveFileModel::ReadOnlyWaveFileModel(FileSource source, sv_samplerate_t targetRate) :
     m_source(source),
     m_path(source.getLocation()),
-    m_reader(0),
+    m_reader(nullptr),
     m_myReader(true),
     m_startFrame(0),
-    m_fillThread(0),
-    m_updateTimer(0),
+    m_fillThread(nullptr),
+    m_updateTimer(nullptr),
     m_lastFillExtent(0),
     m_prevCompletion(0),
     m_exiting(false),
@@ -90,11 +90,11 @@
 ReadOnlyWaveFileModel::ReadOnlyWaveFileModel(FileSource source, AudioFileReader *reader) :
     m_source(source),
     m_path(source.getLocation()),
-    m_reader(0),
+    m_reader(nullptr),
     m_myReader(false),
     m_startFrame(0),
-    m_fillThread(0),
-    m_updateTimer(0),
+    m_fillThread(nullptr),
+    m_updateTimer(nullptr),
     m_lastFillExtent(0),
     m_prevCompletion(0),
     m_exiting(false)
@@ -113,7 +113,7 @@
     m_exiting = true;
     if (m_fillThread) m_fillThread->wait();
     if (m_myReader) delete m_reader;
-    m_reader = 0;
+    m_reader = nullptr;
 
     SVDEBUG << "ReadOnlyWaveFileModel: Destructor exiting; we had caches of "
             << (m_cache[0].size() * sizeof(Range)) << " and "
@@ -597,9 +597,9 @@
 {
     m_mutex.lock();
     delete m_fillThread;
-    m_fillThread = 0;
+    m_fillThread = nullptr;
     delete m_updateTimer;
-    m_updateTimer = 0;
+    m_updateTimer = nullptr;
     auto prevFillExtent = m_lastFillExtent;
     m_lastFillExtent = getEndFrame();
     m_mutex.unlock();