From f4349fb3e45bd44cef0e2b69af4c9b4cf35dcf43 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Fri, 15 Jun 2018 12:46:15 +0200 Subject: =?UTF-8?q?Run=20clang-tidy=E2=80=99s=20modernize-use-nullptr=20pa?= =?UTF-8?q?ss.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This replaces all NULL or 0 with nullptr when assigned to or returned as a pointer. --- src/ui/control-manager.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/ui/control-manager.cpp') diff --git a/src/ui/control-manager.cpp b/src/ui/control-manager.cpp index 866f2eda7..2f6cf533f 100644 --- a/src/ui/control-manager.cpp +++ b/src/ui/control-manager.cpp @@ -216,7 +216,7 @@ void ControlManagerImpl::setControlSize(int size, bool force) SPCanvasItem *ControlManagerImpl::createControl(SPCanvasGroup *parent, ControlType type) { - SPCanvasItem *item = 0; + SPCanvasItem *item = nullptr; double targetSize = _sizeTable[type][_size - 1]; switch (type) { @@ -259,7 +259,7 @@ SPCanvasItem *ControlManagerImpl::createControl(SPCanvasGroup *parent, ControlTy break; case CTRL_TYPE_UNKNOWN: default: - item = sp_canvas_item_new(parent, SP_TYPE_CTRL, NULL); + item = sp_canvas_item_new(parent, SP_TYPE_CTRL, nullptr); } if (item) { item->ctrlType = type; @@ -387,7 +387,7 @@ SPCanvasItem *ControlManager::createControl(SPCanvasGroup *parent, ControlType t SPCtrlLine *ControlManager::createControlLine(SPCanvasGroup *parent, CtrlLineType type) { - SPCtrlLine *line = SP_CTRLLINE(sp_canvas_item_new(parent, SP_TYPE_CTRLLINE, NULL)); + SPCtrlLine *line = SP_CTRLLINE(sp_canvas_item_new(parent, SP_TYPE_CTRLLINE, nullptr)); if (line) { line->ctrlType = CTRL_TYPE_LINE; @@ -408,7 +408,7 @@ SPCtrlLine *ControlManager::createControlLine(SPCanvasGroup *parent, Geom::Point SPCtrlCurve *ControlManager::createControlCurve(SPCanvasGroup *parent, Geom::Point const &p0, Geom::Point const &p1, Geom::Point const &p2, Geom::Point const &p3, CtrlLineType type) { - SPCtrlCurve *line = SP_CTRLCURVE(sp_canvas_item_new(parent, SP_TYPE_CTRLCURVE, NULL)); + SPCtrlCurve *line = SP_CTRLCURVE(sp_canvas_item_new(parent, SP_TYPE_CTRLCURVE, nullptr)); if (line) { line->ctrlType = CTRL_TYPE_LINE; -- cgit v1.2.3