summaryrefslogtreecommitdiffstats
path: root/src/live_effects/lpeobject.cpp
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/live_effects/lpeobject.cpp
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/live_effects/lpeobject.cpp')
-rw-r--r--src/live_effects/lpeobject.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/live_effects/lpeobject.cpp b/src/live_effects/lpeobject.cpp
index bc5ff0576..c05d00d60 100644
--- a/src/live_effects/lpeobject.cpp
+++ b/src/live_effects/lpeobject.cpp
@@ -22,17 +22,17 @@
static void livepatheffect_on_repr_attr_changed (Inkscape::XML::Node * repr, const gchar *key, const gchar *oldval, const gchar *newval, bool is_interactive, void * data);
static Inkscape::XML::NodeEventVector const livepatheffect_repr_events = {
- NULL, /* child_added */
- NULL, /* child_removed */
+ nullptr, /* child_added */
+ nullptr, /* child_removed */
livepatheffect_on_repr_attr_changed,
- NULL, /* content_changed */
- NULL /* order_changed */
+ nullptr, /* content_changed */
+ nullptr /* order_changed */
};
LivePathEffectObject::LivePathEffectObject()
: SPObject(), effecttype(Inkscape::LivePathEffect::INVALID_LPE), effecttype_set(false),
- lpe(NULL)
+ lpe(nullptr)
{
#ifdef LIVEPATHEFFECT_VERBOSE
g_message("Init livepatheffectobject");
@@ -46,7 +46,7 @@ LivePathEffectObject::~LivePathEffectObject() {
* Virtual build: set livepatheffect attributes from its associated XML node.
*/
void LivePathEffectObject::build(SPDocument *document, Inkscape::XML::Node *repr) {
- g_assert(this != NULL);
+ g_assert(this != nullptr);
g_assert(SP_IS_OBJECT(this));
SPObject::build(document, repr);
@@ -85,7 +85,7 @@ void LivePathEffectObject::release() {
if (this->lpe) {
delete this->lpe;
- this->lpe = NULL;
+ this->lpe = nullptr;
}
this->effecttype = Inkscape::LivePathEffect::INVALID_LPE;
@@ -105,7 +105,7 @@ void LivePathEffectObject::set(unsigned key, gchar const *value) {
case SP_PROP_PATH_EFFECT:
if (this->lpe) {
delete this->lpe;
- this->lpe = NULL;
+ this->lpe = nullptr;
}
if ( value && Inkscape::LivePathEffect::LPETypeConverter.is_valid_key(value) ) {
@@ -114,7 +114,7 @@ void LivePathEffectObject::set(unsigned key, gchar const *value) {
this->effecttype_set = true;
} else {
this->effecttype = Inkscape::LivePathEffect::INVALID_LPE;
- this->lpe = NULL;
+ this->lpe = nullptr;
this->effecttype_set = false;
}
@@ -180,7 +180,7 @@ LivePathEffectObject *LivePathEffectObject::fork_private_if_necessary(unsigned i
Inkscape::XML::Document *xml_doc = doc->getReprDoc();
Inkscape::XML::Node *dup_repr = this->getRepr()->duplicate(xml_doc);
- doc->getDefs()->getRepr()->addChild(dup_repr, NULL);
+ doc->getDefs()->getRepr()->addChild(dup_repr, nullptr);
LivePathEffectObject *lpeobj_new = LIVEPATHEFFECT( doc->getObjectByRepr(dup_repr) );
Inkscape::GC::release(dup_repr);