Mercurial > hg > svcore
diff data/fileio/CSVFileReader.cpp @ 1582:70e172e6cc59 fix-static-analysis
Use nullptr throughout
author | Chris Cannam |
---|---|
date | Mon, 26 Nov 2018 14:33:41 +0000 |
parents | 954d0cf29ca7 |
children | 7a23dfe65d66 |
line wrap: on
line diff
--- a/data/fileio/CSVFileReader.cpp Mon Nov 26 13:51:36 2018 +0000 +++ b/data/fileio/CSVFileReader.cpp Mon Nov 26 14:33:41 2018 +0000 @@ -47,7 +47,7 @@ sv_samplerate_t mainModelSampleRate, ProgressReporter *reporter) : m_format(format), - m_device(0), + m_device(nullptr), m_ownDevice(true), m_warnings(0), m_mainModelSampleRate(mainModelSampleRate), @@ -107,7 +107,7 @@ bool CSVFileReader::isOK() const { - return (m_device != 0); + return (m_device != nullptr); } QString @@ -172,7 +172,7 @@ Model * CSVFileReader::load() const { - if (!m_device) return 0; + if (!m_device) return nullptr; CSVFormat::ModelType modelType = m_format.getModelType(); CSVFormat::TimingType timingType = m_format.getTimingType(); @@ -197,13 +197,13 @@ } } - SparseOneDimensionalModel *model1 = 0; - SparseTimeValueModel *model2 = 0; - RegionModel *model2a = 0; - NoteModel *model2b = 0; - EditableDenseThreeDimensionalModel *model3 = 0; - WritableWaveFileModel *modelW = 0; - Model *model = 0; + SparseOneDimensionalModel *model1 = nullptr; + SparseTimeValueModel *model2 = nullptr; + RegionModel *model2a = nullptr; + NoteModel *model2b = nullptr; + EditableDenseThreeDimensionalModel *model3 = nullptr; + WritableWaveFileModel *modelW = nullptr; + Model *model = nullptr; QTextStream in(m_device); @@ -231,7 +231,7 @@ } int audioChannels = 0; - float **audioSamples = 0; + float **audioSamples = nullptr; float sampleShift = 0.f; float sampleScale = 1.f; @@ -370,9 +370,9 @@ << endl; if (model) { delete model; - model = 0; - model1 = 0; model2 = 0; model2a = 0; model2b = 0; - model3 = 0; modelW = 0; + model = nullptr; + model1 = nullptr; model2 = nullptr; model2a = nullptr; model2b = nullptr; + model3 = nullptr; modelW = nullptr; } abandoned = true; break;