Mercurial > hg > svapp
diff audio/AudioGenerator.cpp @ 636:e2715204feaa fix-static-analysis
Use nullptr throughout
author | Chris Cannam |
---|---|
date | Mon, 26 Nov 2018 14:34:06 +0000 |
parents | 7d3a6357ce64 |
children | 6240788893e7 |
line wrap: on
line diff
--- a/audio/AudioGenerator.cpp Mon Nov 26 13:53:57 2018 +0000 +++ b/audio/AudioGenerator.cpp Mon Nov 26 14:34:06 2018 +0000 @@ -50,7 +50,7 @@ m_targetChannelCount(1), m_waveType(0), m_soloing(false), - m_channelBuffer(0), + m_channelBuffer(nullptr), m_channelBufSiz(0), m_channelBufCount(0) { @@ -216,7 +216,7 @@ QString clipId; const Playable *playable = model; - if (!playable || !playable->canPlay()) return 0; + if (!playable || !playable->canPlay()) return nullptr; PlayParameters *parameters = PlayParameterRepository::getInstance()->getPlayParameters(playable); @@ -230,7 +230,7 @@ if (clipId == "") { SVDEBUG << "AudioGenerator::makeClipMixerFor(" << model << "): no sample, skipping" << endl; - return 0; + return nullptr; } ClipMixer *mixer = new ClipMixer(m_targetChannelCount, @@ -244,7 +244,7 @@ double level = wantsQuieterClips(model) ? 0.5 : 1.0; if (!mixer->loadClipData(clipPath, clipF0, level)) { delete mixer; - return 0; + return nullptr; } #ifdef DEBUG_AUDIO_GENERATOR @@ -258,7 +258,7 @@ AudioGenerator::makeSynthFor(const Model *model) { const Playable *playable = model; - if (!playable || !playable->canPlay()) return 0; + if (!playable || !playable->canPlay()) return nullptr; ContinuousSynth *synth = new ContinuousSynth(m_targetChannelCount, m_sourceSampleRate,