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/tools/lpe-tool.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/ui/tools/lpe-tool.cpp') diff --git a/src/ui/tools/lpe-tool.cpp b/src/ui/tools/lpe-tool.cpp index f62a70c34..c523b7bde 100644 --- a/src/ui/tools/lpe-tool.cpp +++ b/src/ui/tools/lpe-tool.cpp @@ -73,8 +73,8 @@ const std::string LpeTool::prefsPath = "/tools/lpetool"; LpeTool::LpeTool() : PenTool(cursor_crosshairs_xpm) - , shape_editor(NULL) - , canvas_bbox(NULL) + , shape_editor(nullptr) + , canvas_bbox(nullptr) , mode(Inkscape::LivePathEffect::BEND_PATH) // TODO: pointer? , measuring_items(new std::map) @@ -83,16 +83,16 @@ LpeTool::LpeTool() LpeTool::~LpeTool() { delete this->shape_editor; - this->shape_editor = NULL; + this->shape_editor = nullptr; if (this->canvas_bbox) { sp_canvas_item_destroy(SP_CANVAS_ITEM(this->canvas_bbox)); - this->canvas_bbox = NULL; + this->canvas_bbox = nullptr; } lpetool_delete_measuring_items(this); delete this->measuring_items; - this->measuring_items = NULL; + this->measuring_items = nullptr; this->sel_changed_connection.disconnect(); } @@ -343,7 +343,7 @@ lpetool_context_reset_limiting_bbox(LpeTool *lc) { if (lc->canvas_bbox) { sp_canvas_item_destroy(lc->canvas_bbox); - lc->canvas_bbox = NULL; + lc->canvas_bbox = nullptr; } Inkscape::Preferences *prefs = Inkscape::Preferences::get(); @@ -407,7 +407,7 @@ lpetool_create_measuring_items(LpeTool *lc, Inkscape::Selection *selection) if (!show) sp_canvas_item_hide(SP_CANVAS_ITEM(canvas_text)); - Inkscape::Util::Unit const * unit = NULL; + Inkscape::Util::Unit const * unit = nullptr; if (prefs->getString("/tools/lpetool/unit").compare("")) { unit = unit_table.getUnit(prefs->getString("/tools/lpetool/unit")); } else { @@ -446,7 +446,7 @@ lpetool_update_measuring_items(LpeTool *lc) SPPath *path = i->first; SPCurve *curve = path->getCurve(); Geom::Piecewise > pwd2 = Geom::paths_to_pw(curve->get_pathvector()); - Inkscape::Util::Unit const * unit = NULL; + Inkscape::Util::Unit const * unit = nullptr; if (prefs->getString("/tools/lpetool/unit").compare("")) { unit = unit_table.getUnit(prefs->getString("/tools/lpetool/unit")); } else { -- cgit v1.2.3