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/xml/node-fns.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/xml/node-fns.cpp') diff --git a/src/xml/node-fns.cpp b/src/xml/node-fns.cpp index e1506e3f2..18b12075d 100644 --- a/src/xml/node-fns.cpp +++ b/src/xml/node-fns.cpp @@ -42,7 +42,7 @@ bool id_permitted_internal_memoized(GQuark qname) { } bool id_permitted(Node const *node) { - g_return_val_if_fail(node != NULL, false); + g_return_val_if_fail(node != nullptr, false); if ( node->type() != ELEMENT_NODE ) { return false; @@ -62,14 +62,14 @@ Node *previous_node(Node *node) { using Inkscape::Algorithms::find_if_before; if ( !node || !node->parent() ) { - return NULL; + return nullptr; } Node *previous=find_if_before( - node->parent()->firstChild(), NULL, node_matches(*node) + node->parent()->firstChild(), nullptr, node_matches(*node) ); - g_assert(previous == NULL + g_assert(previous == nullptr ? node->parent()->firstChild() == node : previous->next() == node); -- cgit v1.2.3