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-object.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/object/sp-object.h') diff --git a/src/object/sp-object.h b/src/object/sp-object.h index f969e0c0a..3b083761e 100644 --- a/src/object/sp-object.h +++ b/src/object/sp-object.h @@ -137,7 +137,7 @@ public: * \pre object points to real object * @todo need to move this to be a member of SPObject. */ -SPObject *sp_object_ref(SPObject *object, SPObject *owner=NULL); +SPObject *sp_object_ref(SPObject *object, SPObject *owner=nullptr); /** * Decrease reference count of object, with possible debugging and @@ -148,7 +148,7 @@ SPObject *sp_object_ref(SPObject *object, SPObject *owner=NULL); * \pre object points to real object * @todo need to move this to be a member of SPObject. */ -SPObject *sp_object_unref(SPObject *object, SPObject *owner=NULL); +SPObject *sp_object_unref(SPObject *object, SPObject *owner=nullptr); /** * Increase weak refcount. @@ -287,7 +287,7 @@ public: typedef Inkscape::Util::ForwardPointerIterator ConstParentIterator; bool isSiblingOf(SPObject const *object) const { - if (object == NULL) return false; + if (object == nullptr) return false; return this->parent && this->parent == object->parent; } @@ -510,7 +510,7 @@ public: assert(successor != NULL); assert(_successor == NULL); assert(successor->_successor == NULL); - sp_object_ref(successor, NULL); + sp_object_ref(successor, nullptr); _successor = successor; } @@ -696,20 +696,20 @@ public: unsigned getPosition(); - char const * getAttribute(char const *name,SPException *ex=NULL) const; + char const * getAttribute(char const *name,SPException *ex=nullptr) const; void appendChild(Inkscape::XML::Node *child); - void addChild(Inkscape::XML::Node *child,Inkscape::XML::Node *prev=NULL); + void addChild(Inkscape::XML::Node *child,Inkscape::XML::Node *prev=nullptr); /** * Call virtual set() function of object. */ void setKeyValue(unsigned int key, char const *value); - void setAttribute( char const *key, char const *value, SPException *ex=NULL); - void setAttribute( char const *key, Glib::ustring const &value, SPException *ex=NULL); - void setAttribute(Glib::ustring const &key, Glib::ustring const &value, SPException *ex=NULL); + void setAttribute( char const *key, char const *value, SPException *ex=nullptr); + void setAttribute( char const *key, Glib::ustring const &value, SPException *ex=nullptr); + void setAttribute(Glib::ustring const &key, Glib::ustring const &value, SPException *ex=nullptr); /** * Read value of key attribute from XML node into object. @@ -718,7 +718,7 @@ public: char const *getTagName(SPException *ex) const; - void removeAttribute(char const *key, SPException *ex=NULL); + void removeAttribute(char const *key, SPException *ex=nullptr); /** * Returns an object style property. -- cgit v1.2.3