diff view/AlignmentView.cpp @ 1408:c8a6fd3f9dff fix-static-analysis

Use nullptr throughout
author Chris Cannam
date Mon, 26 Nov 2018 14:33:54 +0000
parents 13d9b422f7fe
children 9abddbd57667
line wrap: on
line diff
--- a/view/AlignmentView.cpp	Mon Nov 26 13:52:57 2018 +0000
+++ b/view/AlignmentView.cpp	Mon Nov 26 14:33:54 2018 +0000
@@ -25,8 +25,8 @@
 
 AlignmentView::AlignmentView(QWidget *w) :
     View(w, false),
-    m_above(0),
-    m_below(0)
+    m_above(nullptr),
+    m_below(nullptr)
 {
     setObjectName(tr("AlignmentView"));
 }
@@ -73,7 +73,7 @@
 AlignmentView::setViewAbove(View *v)
 {
     if (m_above) {
-        disconnect(m_above, 0, this, 0);
+        disconnect(m_above, nullptr, this, nullptr);
     }
 
     m_above = v;
@@ -90,7 +90,7 @@
 AlignmentView::setViewBelow(View *v)
 {
     if (m_below) {
-        disconnect(m_below, 0, this, 0);
+        disconnect(m_below, nullptr, this, nullptr);
     }
 
     m_below = v;
@@ -106,7 +106,7 @@
 void
 AlignmentView::paintEvent(QPaintEvent *)
 {
-    if (m_above == 0 || m_below == 0 || !m_manager) return;
+    if (m_above == nullptr || m_below == nullptr || !m_manager) return;
 
     bool darkPalette = false;
     if (m_manager) darkPalette = m_manager->getGlobalDarkBackground();
@@ -147,7 +147,7 @@
         return getDefaultKeyFrames();
     }
 
-    SparseOneDimensionalModel *m = 0;
+    SparseOneDimensionalModel *m = nullptr;
 
     // get the topmost such
     for (int i = 0; i < m_above->getLayerCount(); ++i) {