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/live_effects/lpeobject.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/live_effects/lpeobject.cpp') 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); -- cgit v1.2.3