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/object/sp-root.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/object/sp-root.cpp') diff --git a/src/object/sp-root.cpp b/src/object/sp-root.cpp index 3f31588cc..d1c4b4d35 100644 --- a/src/object/sp-root.cpp +++ b/src/object/sp-root.cpp @@ -30,7 +30,7 @@ SPRoot::SPRoot() : SPGroup(), SPViewBox() { - this->onload = NULL; + this->onload = nullptr; static Inkscape::Version const zero_version(0, 0); @@ -44,7 +44,7 @@ SPRoot::SPRoot() : SPGroup(), SPViewBox() this->width.unset(SVGLength::PERCENT, 1.0, 1.0); this->height.unset(SVGLength::PERCENT, 1.0, 1.0); - this->defs = NULL; + this->defs = nullptr; } SPRoot::~SPRoot() @@ -91,7 +91,7 @@ void SPRoot::build(SPDocument *document, Inkscape::XML::Node *repr) void SPRoot::release() { - this->defs = NULL; + this->defs = nullptr; SPGroup::release(); } @@ -191,7 +191,7 @@ void SPRoot::child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) void SPRoot::remove_child(Inkscape::XML::Node *child) { if (this->defs && (this->defs->getRepr() == child)) { - SPObject *iter = 0; + SPObject *iter = nullptr; // We search for first remaining node - it is not beautiful, but works for (auto& child: children) { @@ -204,7 +204,7 @@ void SPRoot::remove_child(Inkscape::XML::Node *child) if (!iter) { /* we should probably create a new here? */ - this->defs = NULL; + this->defs = nullptr; } } @@ -285,7 +285,7 @@ void SPRoot::update(SPCtx *ctx, guint flags) SPGroup::update((SPCtx *) &rctx, flags); /* As last step set additional transform of drawing group */ - for (SPItemView *v = this->display; v != NULL; v = v->next) { + for (SPItemView *v = this->display; v != nullptr; v = v->next) { Inkscape::DrawingGroup *g = dynamic_cast(v->arenaitem); g->setChildTransform(this->c2p); } -- cgit v1.2.3