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/box3d.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/object/box3d.cpp') diff --git a/src/object/box3d.cpp b/src/object/box3d.cpp index af1d00b0f..08190edfd 100644 --- a/src/object/box3d.cpp +++ b/src/object/box3d.cpp @@ -44,7 +44,7 @@ SPBox3D::SPBox3D() : SPGroup() { this->my_counter = 0; this->swapped = Box3D::NONE; - this->persp_href = NULL; + this->persp_href = nullptr; this->persp_ref = new Persp3DReference(this); /* we initialize the z-orders to zero so that they are updated during dragging */ @@ -93,7 +93,7 @@ void SPBox3D::release() { if (box->persp_ref) { box->persp_ref->detach(); delete box->persp_ref; - box->persp_ref = NULL; + box->persp_ref = nullptr; } if (persp) { @@ -126,7 +126,7 @@ void SPBox3D::set(unsigned int key, const gchar* value) { } else { if (box->persp_href) { g_free(box->persp_href); - box->persp_href = NULL; + box->persp_href = nullptr; } if (value) { box->persp_href = g_strdup(value); @@ -434,7 +434,7 @@ box3d_snap (SPBox3D *box, int id, Proj::Pt3 const &pt_proj, Proj::Pt3 const &sta SPBox3D * SPBox3D::createBox3D(SPItem * parent) { - SPBox3D *box3d = 0; + SPBox3D *box3d = nullptr; Inkscape::XML::Document *xml_doc = parent->document->rdoc; Inkscape::XML::Node *repr = xml_doc->createElement("svg:g"); repr->setAttribute("sodipodi:type", "inkscape:box3d"); @@ -1297,7 +1297,7 @@ SPGroup *box3d_convert_to_group(SPBox3D *box) grepr->setAttribute("id", id); SPGroup *group = dynamic_cast(doc->getObjectByRepr(grepr)); - g_assert(group != NULL); + g_assert(group != nullptr); return group; } -- cgit v1.2.3