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/ui/tool/node.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/ui/tool/node.h') diff --git a/src/ui/tool/node.h b/src/ui/tool/node.h index 6a766125a..594f6b633 100644 --- a/src/ui/tool/node.h +++ b/src/ui/tool/node.h @@ -304,16 +304,16 @@ class NodeIterator public: typedef NodeIterator self; NodeIterator() - : _node(0) + : _node(nullptr) {} // default copy, default assign self &operator++() { - _node = (_node?_node->ln_next:NULL); + _node = (_node?_node->ln_next:nullptr); return *this; } self &operator--() { - _node = (_node?_node->ln_prev:NULL); + _node = (_node?_node->ln_prev:nullptr); return *this; } bool operator==(self const &other) const { if(&other){return _node == other._node;} else{return false;} } @@ -387,9 +387,9 @@ public: bool degenerate(); void setClosed(bool c) { _closed = c; } - iterator before(double t, double *fracpart = NULL); + iterator before(double t, double *fracpart = nullptr); iterator before(Geom::PathTime const &pvp); - const_iterator before(double t, double *fracpart = NULL) const { + const_iterator before(double t, double *fracpart = nullptr) const { return const_iterator(before(t, fracpart)._node); } const_iterator before(Geom::PathTime const &pvp) const { -- cgit v1.2.3