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/drawing-group.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/display/drawing-group.cpp') diff --git a/src/display/drawing-group.cpp b/src/display/drawing-group.cpp index 6abce34a2..22a6c42ed 100644 --- a/src/display/drawing-group.cpp +++ b/src/display/drawing-group.cpp @@ -18,7 +18,7 @@ namespace Inkscape { DrawingGroup::DrawingGroup(Drawing &drawing) : DrawingItem(drawing) - , _child_transform(NULL) + , _child_transform(nullptr) {} DrawingGroup::~DrawingGroup() @@ -54,7 +54,7 @@ DrawingGroup::setChildTransform(Geom::Affine const &new_trans) _markForRendering(); if (new_trans.isIdentity()) { delete _child_transform; // delete NULL; is safe - _child_transform = NULL; + _child_transform = nullptr; } else { _child_transform = new Geom::Affine(new_trans); } @@ -89,7 +89,7 @@ DrawingGroup::_updateItem(Geom::IntRect const &area, UpdateContext const &ctx, u unsigned DrawingGroup::_renderItem(DrawingContext &dc, Geom::IntRect const &area, unsigned flags, DrawingItem *stop_at) { - if (stop_at == NULL) { + if (stop_at == nullptr) { // normal rendering for (ChildrenList::iterator i = _children.begin(); i != _children.end(); ++i) { i->setAntialiasing(_antialias); @@ -131,7 +131,7 @@ DrawingGroup::_pickItem(Geom::Point const &p, double delta, unsigned flags) return _pick_children ? picked : this; } } - return NULL; + return nullptr; } bool @@ -142,7 +142,7 @@ DrawingGroup::_canClip() bool is_drawing_group(DrawingItem *item) { - return dynamic_cast(item) != NULL; + return dynamic_cast(item) != nullptr; } } // end namespace Inkscape -- cgit v1.2.3