Mercurial > hg > svgui
diff view/View.cpp @ 1408:c8a6fd3f9dff fix-static-analysis
Use nullptr throughout
author | Chris Cannam |
---|---|
date | Mon, 26 Nov 2018 14:33:54 +0000 |
parents | b0eeec95ab5b |
children | 2487521e857b |
line wrap: on
line diff
--- a/view/View.cpp Mon Nov 26 13:52:57 2018 +0000 +++ b/view/View.cpp Mon Nov 26 14:33:54 2018 +0000 @@ -62,15 +62,15 @@ m_followPlayIsDetached(false), m_playPointerFrame(0), m_showProgress(showProgress), - m_cache(0), - m_buffer(0), + m_cache(nullptr), + m_buffer(nullptr), m_cacheValid(false), m_cacheCentreFrame(0), m_cacheZoomLevel(ZoomLevel::FramesPerPixel, 1024), m_selectionCached(false), m_deleting(false), m_haveSelectedLayer(false), - m_manager(0), + m_manager(nullptr), m_propertyContainer(new ViewPropertyContainer(this)) { // cerr << "View::View(" << this << ")" << endl; @@ -264,7 +264,7 @@ m_cacheValid = false; - Layer *selectedLayer = 0; + Layer *selectedLayer = nullptr; for (LayerList::iterator i = m_layerStack.begin(); i != m_layerStack.end(); ++i) { if (*i == pc) { @@ -793,7 +793,7 @@ } } } - return 0; + return nullptr; } const Layer * @@ -808,7 +808,7 @@ if (m_haveSelectedLayer && !m_layerStack.empty()) { return getLayer(getLayerCount() - 1); } else { - return 0; + return nullptr; } } @@ -1349,12 +1349,12 @@ if (!m_manager || !m_manager->getAlignMode() || !m_manager->getPlaybackModel()) { - return 0; + return nullptr; } - Model *anyModel = 0; - Model *alignedModel = 0; - Model *goodModel = 0; + Model *anyModel = nullptr; + Model *alignedModel = nullptr; + Model *goodModel = nullptr; for (LayerList::const_iterator i = m_layerStack.begin(); i != m_layerStack.end(); ++i) { @@ -2022,7 +2022,7 @@ if (dx > -m_cache->width() && dx < m_cache->width()) { - m_cache->scroll(dx, 0, m_cache->rect(), 0); + m_cache->scroll(dx, 0, m_cache->rect(), nullptr); if (dx < 0) { cacheAreaToRepaint = @@ -2723,7 +2723,7 @@ if (!render(*paint, 0, f0, f1)) { delete paint; delete image; - return 0; + return nullptr; } else { delete paint; return image;