comparison main/OSCHandler.cpp @ 2126:0b15f3b16776 fix-static-analysis

Use nullptr throughout
author Chris Cannam
date Mon, 26 Nov 2018 14:35:05 +0000
parents b184e71f880d
children 76b1c50f1f6d
comparison
equal deleted inserted replaced
2125:124de219669f 2126:0b15f3b16776
269 269
270 f0 = lrint(t0 * getMainModel()->getSampleRate()); 270 f0 = lrint(t0 * getMainModel()->getSampleRate());
271 f1 = lrint(t1 * getMainModel()->getSampleRate()); 271 f1 = lrint(t1 * getMainModel()->getSampleRate());
272 272
273 Pane *pane = m_paneStack->getCurrentPane(); 273 Pane *pane = m_paneStack->getCurrentPane();
274 Layer *layer = 0; 274 Layer *layer = nullptr;
275 if (pane) layer = pane->getSelectedLayer(); 275 if (pane) layer = pane->getSelectedLayer();
276 if (layer) { 276 if (layer) {
277 int resolution; 277 int resolution;
278 layer->snapToFeatureFrame(pane, f0, resolution, 278 layer->snapToFeatureFrame(pane, f0, resolution,
279 Layer::SnapLeft); 279 Layer::SnapLeft);
406 (m_paneStack->getLayoutStyle() == PaneStack::NoPropertyStacks)); 406 (m_paneStack->getLayoutStyle() == PaneStack::NoPropertyStacks));
407 if (toggle) togglePropertyBoxes(); 407 if (toggle) togglePropertyBoxes();
408 } 408 }
409 409
410 } else { 410 } else {
411 PropertyContainer *container = 0; 411 PropertyContainer *container = nullptr;
412 Pane *pane = m_paneStack->getCurrentPane(); 412 Pane *pane = m_paneStack->getCurrentPane();
413 if (pane && 413 if (pane &&
414 message.getArgCount() == 3 && 414 message.getArgCount() == 3 &&
415 message.getArg(0).canConvert(QVariant::String) && 415 message.getArg(0).canConvert(QVariant::String) &&
416 message.getArg(1).canConvert(QVariant::String) && 416 message.getArg(1).canConvert(QVariant::String) &&
452 m_paneStack->setCurrentPane(pane); 452 m_paneStack->setCurrentPane(pane);
453 if (layerIndex >= 0 && layerIndex < pane->getLayerCount()) { 453 if (layerIndex >= 0 && layerIndex < pane->getLayerCount()) {
454 Layer *layer = pane->getLayer(layerIndex); 454 Layer *layer = pane->getLayer(layerIndex);
455 m_paneStack->setCurrentLayer(pane, layer); 455 m_paneStack->setCurrentLayer(pane, layer);
456 } else if (wantLayer && layerIndex == -1) { 456 } else if (wantLayer && layerIndex == -1) {
457 m_paneStack->setCurrentLayer(pane, 0); 457 m_paneStack->setCurrentLayer(pane, nullptr);
458 } 458 }
459 } 459 }
460 460
461 } else if (message.getMethod() == "delete") { 461 } else if (message.getMethod() == "delete") {
462 462
512 } 512 }
513 513
514 } else if (message.getMethod() == "zoomvertical") { 514 } else if (message.getMethod() == "zoomvertical") {
515 515
516 Pane *pane = m_paneStack->getCurrentPane(); 516 Pane *pane = m_paneStack->getCurrentPane();
517 Layer *layer = 0; 517 Layer *layer = nullptr;
518 if (pane && pane->getLayerCount() > 0) { 518 if (pane && pane->getLayerCount() > 0) {
519 layer = pane->getLayer(pane->getLayerCount() - 1); 519 layer = pane->getLayer(pane->getLayerCount() - 1);
520 } 520 }
521 int defaultStep = 0; 521 int defaultStep = 0;
522 int steps = 0; 522 int steps = 0;