Mercurial > hg > svcore
diff data/fileio/WavFileWriter.cpp @ 1582:70e172e6cc59 fix-static-analysis
Use nullptr throughout
author | Chris Cannam |
---|---|
date | Mon, 26 Nov 2018 14:33:41 +0000 |
parents | 8988b27ebf38 |
children |
line wrap: on
line diff
--- a/data/fileio/WavFileWriter.cpp Mon Nov 26 13:51:36 2018 +0000 +++ b/data/fileio/WavFileWriter.cpp Mon Nov 26 14:33:41 2018 +0000 @@ -39,8 +39,8 @@ m_path(path), m_sampleRate(sampleRate), m_channels(channels), - m_temp(0), - m_file(0) + m_temp(nullptr), + m_file(nullptr) { SF_INFO fileInfo; @@ -73,13 +73,13 @@ .arg(writePath); if (m_temp) { delete m_temp; - m_temp = 0; + m_temp = nullptr; } } } catch (FileOperationFailed &f) { m_error = f.what(); - m_temp = 0; - m_file = 0; + m_temp = nullptr; + m_file = nullptr; } } @@ -218,12 +218,12 @@ { if (m_file) { sf_close(m_file); - m_file = 0; + m_file = nullptr; } if (m_temp) { m_temp->moveToTarget(); delete m_temp; - m_temp = 0; + m_temp = nullptr; } return true; }