comparison data/fileio/AudioFileReaderFactory.cpp @ 1582:70e172e6cc59 fix-static-analysis

Use nullptr throughout
author Chris Cannam
date Mon, 26 Nov 2018 14:33:41 +0000
parents 1c9bbbb6116a
children ce185d4dd408
comparison
equal deleted inserted replaced
1581:ad5f892c0c4d 1582:70e172e6cc59
66 SVDEBUG << "AudioFileReaderFactory: url \"" << source.getLocation() << "\": requested rate: " << params.targetRate << (params.targetRate == 0 ? " (use source rate)" : "") << endl; 66 SVDEBUG << "AudioFileReaderFactory: url \"" << source.getLocation() << "\": requested rate: " << params.targetRate << (params.targetRate == 0 ? " (use source rate)" : "") << endl;
67 SVDEBUG << "AudioFileReaderFactory: local filename \"" << source.getLocalFilename() << "\", content type \"" << source.getContentType() << "\"" << endl; 67 SVDEBUG << "AudioFileReaderFactory: local filename \"" << source.getLocalFilename() << "\", content type \"" << source.getContentType() << "\"" << endl;
68 68
69 if (!source.isOK()) { 69 if (!source.isOK()) {
70 SVCERR << "AudioFileReaderFactory::createReader(\"" << source.getLocation() << "\": Failed to retrieve source (transmission error?): " << source.getErrorString() << endl; 70 SVCERR << "AudioFileReaderFactory::createReader(\"" << source.getLocation() << "\": Failed to retrieve source (transmission error?): " << source.getErrorString() << endl;
71 return 0; 71 return nullptr;
72 } 72 }
73 73
74 if (!source.isAvailable()) { 74 if (!source.isAvailable()) {
75 SVCERR << "AudioFileReaderFactory::createReader(\"" << source.getLocation() << "\": Source not found" << endl; 75 SVCERR << "AudioFileReaderFactory::createReader(\"" << source.getLocation() << "\": Source not found" << endl;
76 return 0; 76 return nullptr;
77 } 77 }
78 78
79 AudioFileReader *reader = 0; 79 AudioFileReader *reader = nullptr;
80 80
81 sv_samplerate_t targetRate = params.targetRate; 81 sv_samplerate_t targetRate = params.targetRate;
82 bool normalised = (params.normalisation == Normalisation::Peak); 82 bool normalised = (params.normalisation == Normalisation::Peak);
83 83
84 sv_frame_t estimatedSamples = 84 sv_frame_t estimatedSamples =