Mercurial > hg > svcore
diff data/model/WritableWaveFileModel.cpp @ 1582:70e172e6cc59 fix-static-analysis
Use nullptr throughout
author | Chris Cannam |
---|---|
date | Mon, 26 Nov 2018 14:33:41 +0000 |
parents | 954d0cf29ca7 |
children | 82d03c9661f9 |
line wrap: on
line diff
--- a/data/model/WritableWaveFileModel.cpp Mon Nov 26 13:51:36 2018 +0000 +++ b/data/model/WritableWaveFileModel.cpp Mon Nov 26 14:33:41 2018 +0000 @@ -40,10 +40,10 @@ sv_samplerate_t sampleRate, int channels, Normalisation norm) : - m_model(0), - m_temporaryWriter(0), - m_targetWriter(0), - m_reader(0), + m_model(nullptr), + m_temporaryWriter(nullptr), + m_targetWriter(nullptr), + m_reader(nullptr), m_normalisation(norm), m_sampleRate(sampleRate), m_channels(channels), @@ -57,10 +57,10 @@ WritableWaveFileModel::WritableWaveFileModel(sv_samplerate_t sampleRate, int channels, Normalisation norm) : - m_model(0), - m_temporaryWriter(0), - m_targetWriter(0), - m_reader(0), + m_model(nullptr), + m_temporaryWriter(nullptr), + m_targetWriter(nullptr), + m_reader(nullptr), m_normalisation(norm), m_sampleRate(sampleRate), m_channels(channels), @@ -73,10 +73,10 @@ WritableWaveFileModel::WritableWaveFileModel(sv_samplerate_t sampleRate, int channels) : - m_model(0), - m_temporaryWriter(0), - m_targetWriter(0), - m_reader(0), + m_model(nullptr), + m_temporaryWriter(nullptr), + m_targetWriter(nullptr), + m_reader(nullptr), m_normalisation(Normalisation::None), m_sampleRate(sampleRate), m_channels(channels), @@ -150,7 +150,7 @@ if (!m_model->isOK()) { SVCERR << "WritableWaveFileModel: Error in creating wave file model" << endl; delete m_model; - m_model = 0; + m_model = nullptr; return; } m_model->setStartFrame(m_startFrame); @@ -291,7 +291,7 @@ m_targetWriter->close(); delete m_temporaryWriter; - m_temporaryWriter = 0; + m_temporaryWriter = nullptr; QFile::remove(m_temporaryPath); }