summaryrefslogtreecommitdiffstats
path: root/src/object/sp-object.h
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2018-06-15 10:46:15 +0000
committerMarc Jeanmougin <marcjeanmougin@free.fr>2018-06-18 12:27:01 +0000
commitf4349fb3e45bd44cef0e2b69af4c9b4cf35dcf43 (patch)
tree7c6044fd3a17a2665841959dac9b3b2110b27924 /src/object/sp-object.h
parentRun clang-tidy’s modernize-use-override pass. (diff)
downloadinkscape-f4349fb3e45bd44cef0e2b69af4c9b4cf35dcf43.tar.gz
inkscape-f4349fb3e45bd44cef0e2b69af4c9b4cf35dcf43.zip
Run clang-tidy’s modernize-use-nullptr pass.
This replaces all NULL or 0 with nullptr when assigned to or returned as a pointer.
Diffstat (limited to 'src/object/sp-object.h')
-rw-r--r--src/object/sp-object.h20
1 files changed, 10 insertions, 10 deletions
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<SPObject const, ParentIteratorStrategy> 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.