comparison framework/Align.cpp @ 636:e2715204feaa fix-static-analysis

Use nullptr throughout
author Chris Cannam
date Mon, 26 Nov 2018 14:34:06 +0000
parents b23bebfdfaba
children 284cb118368e e19c609a7bec
comparison
equal deleted inserted replaced
635:26a0cb8335e3 636:e2715204feaa
176 176
177 if (!reference || !rm) { 177 if (!reference || !rm) {
178 return false; // but this should have been tested already 178 return false; // but this should have been tested already
179 } 179 }
180 180
181 while (!reference->isReady(0) || !rm->isReady(0)) { 181 while (!reference->isReady(nullptr) || !rm->isReady(nullptr)) {
182 qApp->processEvents(); 182 qApp->processEvents();
183 } 183 }
184 184
185 // Run an external program, passing to it paths to the main 185 // Run an external program, passing to it paths to the main
186 // model's audio file and the new model's audio file. It returns 186 // model's audio file and the new model's audio file. It returns
201 return false; 201 return false;
202 } 202 }
203 203
204 m_error = ""; 204 m_error = "";
205 205
206 AlignmentModel *alignmentModel = new AlignmentModel(reference, other, 0, 0); 206 AlignmentModel *alignmentModel = new AlignmentModel(reference, other, nullptr, nullptr);
207 rm->setAlignment(alignmentModel); 207 rm->setAlignment(alignmentModel);
208 208
209 QProcess *process = new QProcess; 209 QProcess *process = new QProcess;
210 QStringList args; 210 QStringList args;
211 args << refPath << otherPath; 211 args << refPath << otherPath;
221 if (!success) { 221 if (!success) {
222 cerr << "ERROR: Align::alignModelViaProgram: Program did not start" 222 cerr << "ERROR: Align::alignModelViaProgram: Program did not start"
223 << endl; 223 << endl;
224 m_error = "Alignment program could not be started"; 224 m_error = "Alignment program could not be started";
225 m_processModels.erase(process); 225 m_processModels.erase(process);
226 rm->setAlignment(0); // deletes alignmentModel as well 226 rm->setAlignment(nullptr); // deletes alignmentModel as well
227 delete process; 227 delete process;
228 } 228 }
229 229
230 return success; 230 return success;
231 } 231 }