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/dynamic-base.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/ui/tools/dynamic-base.cpp') diff --git a/src/ui/tools/dynamic-base.cpp b/src/ui/tools/dynamic-base.cpp index 1026c26c6..8bc1ddb97 100644 --- a/src/ui/tools/dynamic-base.cpp +++ b/src/ui/tools/dynamic-base.cpp @@ -20,15 +20,15 @@ namespace Tools { DynamicBase::DynamicBase(gchar const *const *cursor_shape) : ToolBase(cursor_shape) - , accumulated(NULL) - , currentshape(NULL) - , currentcurve(NULL) - , cal1(NULL) - , cal2(NULL) + , accumulated(nullptr) + , currentshape(nullptr) + , currentcurve(nullptr) + , cal1(nullptr) + , cal2(nullptr) , point1() , point2() , npoints(0) - , repr(NULL) + , repr(nullptr) , cur(0, 0) , vel(0, 0) , vel_max(0) @@ -58,7 +58,7 @@ DynamicBase::DynamicBase(gchar const *const *cursor_shape) DynamicBase::~DynamicBase() { if (this->accumulated) { this->accumulated = this->accumulated->unref(); - this->accumulated = 0; + this->accumulated = nullptr; } for (auto i:segments) { @@ -68,22 +68,22 @@ DynamicBase::~DynamicBase() { if (this->currentcurve) { this->currentcurve = this->currentcurve->unref(); - this->currentcurve = 0; + this->currentcurve = nullptr; } if (this->cal1) { this->cal1 = this->cal1->unref(); - this->cal1 = 0; + this->cal1 = nullptr; } if (this->cal2) { this->cal2 = this->cal2->unref(); - this->cal2 = 0; + this->cal2 = nullptr; } if (this->currentshape) { sp_canvas_item_destroy(this->currentshape); - this->currentshape = 0; + this->currentshape = nullptr; } } -- cgit v1.2.3