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/flood-tool.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/ui/tools/flood-tool.cpp') diff --git a/src/ui/tools/flood-tool.cpp b/src/ui/tools/flood-tool.cpp index 487f3f7d8..aaa5f1d9a 100644 --- a/src/ui/tools/flood-tool.cpp +++ b/src/ui/tools/flood-tool.cpp @@ -109,7 +109,7 @@ const std::vector FloodTool::gap_list( gap_init, gap_init+4 ); FloodTool::FloodTool() : ToolBase(cursor_paintbucket_xpm) - , item(NULL) + , item(nullptr) { // TODO: Why does the flood tool use a hardcoded tolerance instead of a pref? this->tolerance = 4; @@ -119,7 +119,7 @@ FloodTool::~FloodTool() { this->sel_changed_connection.disconnect(); delete this->shape_editor; - this->shape_editor = NULL; + this->shape_editor = nullptr; /* fixme: This is necessary because we do not grab */ if (this->item) { @@ -450,7 +450,7 @@ static void do_trace(bitmap_coords_info bci, guchar *trace_px, SPDesktop *deskto g_free(str); } - desktop->currentLayer()->addChild(pathRepr,NULL); + desktop->currentLayer()->addChild(pathRepr,nullptr); SPObject *reprobj = document->getObjectByRepr(pathRepr); if (reprobj) { @@ -1227,7 +1227,7 @@ bool FloodTool::root_handler(GdkEvent* event) { void FloodTool::finishItem() { this->message_context->clear(); - if (this->item != NULL) { + if (this->item != nullptr) { this->item->updateRepr(); desktop->canvas->endForcedFullRedraws(); @@ -1236,7 +1236,7 @@ void FloodTool::finishItem() { DocumentUndo::done(desktop->getDocument(), SP_VERB_CONTEXT_PAINTBUCKET, _("Fill bounded area")); - this->item = NULL; + this->item = nullptr; } } -- cgit v1.2.3