comparison transform/ModelTransformerFactory.cpp @ 1582:70e172e6cc59 fix-static-analysis

Use nullptr throughout
author Chris Cannam
date Mon, 26 Nov 2018 14:33:41 +0000
parents 48e9f538e6e9
children b17fb3a4560c
comparison
equal deleted inserted replaced
1581:ad5f892c0c4d 1582:70e172e6cc59
57 AudioPlaySource *source, 57 AudioPlaySource *source,
58 sv_frame_t startFrame, 58 sv_frame_t startFrame,
59 sv_frame_t duration, 59 sv_frame_t duration,
60 UserConfigurator *configurator) 60 UserConfigurator *configurator)
61 { 61 {
62 ModelTransformer::Input input(0); 62 ModelTransformer::Input input(nullptr);
63 63
64 if (candidateInputModels.empty()) return input; 64 if (candidateInputModels.empty()) return input;
65 65
66 //!!! This will need revision -- we'll have to have a callback 66 //!!! This will need revision -- we'll have to have a callback
67 //from the dialog for when the candidate input model is changed, 67 //from the dialog for when the candidate input model is changed,
89 bool ok = true; 89 bool ok = true;
90 QString configurationXml = m_lastConfigurations[transform.getIdentifier()]; 90 QString configurationXml = m_lastConfigurations[transform.getIdentifier()];
91 91
92 SVDEBUG << "ModelTransformer: last configuration for identifier " << transform.getIdentifier() << ": " << configurationXml << endl; 92 SVDEBUG << "ModelTransformer: last configuration for identifier " << transform.getIdentifier() << ": " << configurationXml << endl;
93 93
94 Vamp::PluginBase *plugin = 0; 94 Vamp::PluginBase *plugin = nullptr;
95 95
96 if (RealTimePluginFactory::instanceFor(id)) { 96 if (RealTimePluginFactory::instanceFor(id)) {
97 97
98 SVDEBUG << "ModelTransformerFactory::getConfigurationForTransform: instantiating real-time plugin" << endl; 98 SVDEBUG << "ModelTransformerFactory::getConfigurationForTransform: instantiating real-time plugin" << endl;
99 99
169 169
170 ModelTransformer * 170 ModelTransformer *
171 ModelTransformerFactory::createTransformer(const Transforms &transforms, 171 ModelTransformerFactory::createTransformer(const Transforms &transforms,
172 const ModelTransformer::Input &input) 172 const ModelTransformer::Input &input)
173 { 173 {
174 ModelTransformer *transformer = 0; 174 ModelTransformer *transformer = nullptr;
175 175
176 QString id = transforms[0].getPluginIdentifier(); 176 QString id = transforms[0].getPluginIdentifier();
177 177
178 if (RealTimePluginFactory::instanceFor(id)) { 178 if (RealTimePluginFactory::instanceFor(id)) {
179 179
199 SVDEBUG << "ModelTransformerFactory::transform: Constructing transformer with input model " << input.getModel() << endl; 199 SVDEBUG << "ModelTransformerFactory::transform: Constructing transformer with input model " << input.getModel() << endl;
200 200
201 Transforms transforms; 201 Transforms transforms;
202 transforms.push_back(transform); 202 transforms.push_back(transform);
203 vector<Model *> mm = transformMultiple(transforms, input, message, handler); 203 vector<Model *> mm = transformMultiple(transforms, input, message, handler);
204 if (mm.empty()) return 0; 204 if (mm.empty()) return nullptr;
205 else return mm[0]; 205 else return mm[0];
206 } 206 }
207 207
208 vector<Model *> 208 vector<Model *>
209 ModelTransformerFactory::transformMultiple(const Transforms &transforms, 209 ModelTransformerFactory::transformMultiple(const Transforms &transforms,