comparison layer/SliceLayer.cpp @ 1408:c8a6fd3f9dff fix-static-analysis

Use nullptr throughout
author Chris Cannam
date Mon, 26 Nov 2018 14:33:54 +0000
parents 10e768adaee5
children dbff4b290bf0
comparison
equal deleted inserted replaced
1407:05d614f6e46d 1408:c8a6fd3f9dff
30 #include <QPainterPath> 30 #include <QPainterPath>
31 #include <QTextStream> 31 #include <QTextStream>
32 32
33 33
34 SliceLayer::SliceLayer() : 34 SliceLayer::SliceLayer() :
35 m_sliceableModel(0), 35 m_sliceableModel(nullptr),
36 m_binAlignment(BinsSpanScalePoints), 36 m_binAlignment(BinsSpanScalePoints),
37 m_colourMap(int(ColourMapper::Ice)), 37 m_colourMap(int(ColourMapper::Ice)),
38 m_colourInverted(false), 38 m_colourInverted(false),
39 m_energyScale(dBScale), 39 m_energyScale(dBScale),
40 m_samplingMode(SampleMean), 40 m_samplingMode(SampleMean),
99 SliceLayer::modelAboutToBeDeleted(Model *m) 99 SliceLayer::modelAboutToBeDeleted(Model *m)
100 { 100 {
101 SVDEBUG << "SliceLayer::modelAboutToBeDeleted(" << m << ")" << endl; 101 SVDEBUG << "SliceLayer::modelAboutToBeDeleted(" << m << ")" << endl;
102 102
103 if (m == m_sliceableModel) { 103 if (m == m_sliceableModel) {
104 setSliceableModel(0); 104 setSliceableModel(nullptr);
105 } 105 }
106 } 106 }
107 107
108 QString 108 QString
109 SliceLayer::getFeatureDescription(LayerGeometryProvider *v, QPoint &p) const 109 SliceLayer::getFeatureDescription(LayerGeometryProvider *v, QPoint &p) const
1260 } 1260 }
1261 1261
1262 RangeMapper * 1262 RangeMapper *
1263 SliceLayer::getNewVerticalZoomRangeMapper() const 1263 SliceLayer::getNewVerticalZoomRangeMapper() const
1264 { 1264 {
1265 if (!m_sliceableModel) return 0; 1265 if (!m_sliceableModel) return nullptr;
1266 1266
1267 return new LinearRangeMapper(0, m_sliceableModel->getHeight(), 1267 return new LinearRangeMapper(0, m_sliceableModel->getHeight(),
1268 0, m_sliceableModel->getHeight(), ""); 1268 0, m_sliceableModel->getHeight(), "");
1269 } 1269 }
1270 1270