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/display/curve.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/display/curve.cpp') diff --git a/src/display/curve.cpp b/src/display/curve.cpp index 1115978e9..e424fee05 100644 --- a/src/display/curve.cpp +++ b/src/display/curve.cpp @@ -127,7 +127,7 @@ SPCurve::unref() delete this; } - return NULL; + return nullptr; } /** @@ -341,7 +341,7 @@ SPCurve::is_closed() const bool SPCurve::is_equal(SPCurve * other) const { - if(other == NULL) { + if(other == nullptr) { return false; } else if(_pathv == other->get_pathvector()){ return true; @@ -357,10 +357,10 @@ Geom::Curve const * SPCurve::last_segment() const { if (is_empty()) { - return NULL; + return nullptr; } if (_pathv.back().empty()) { - return NULL; + return nullptr; } return &_pathv.back().back_default(); @@ -373,7 +373,7 @@ Geom::Path const * SPCurve::last_path() const { if (is_empty()) { - return NULL; + return nullptr; } return &_pathv.back(); @@ -387,10 +387,10 @@ Geom::Curve const * SPCurve::first_segment() const { if (is_empty()) { - return NULL; + return nullptr; } if (_pathv.front().empty()) { - return NULL; + return nullptr; } return &_pathv.front().front(); @@ -403,7 +403,7 @@ Geom::Path const * SPCurve::first_path() const { if (is_empty()) { - return NULL; + return nullptr; } return &_pathv.front(); @@ -545,9 +545,9 @@ SPCurve::append_continuous(SPCurve const *c1, double tolerance) using Geom::X; using Geom::Y; - g_return_val_if_fail(c1 != NULL, NULL); + g_return_val_if_fail(c1 != nullptr, NULL); if ( this->is_closed() || c1->is_closed() ) { - return NULL; + return nullptr; } if (c1->is_empty()) { -- cgit v1.2.3