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/xml/helper-observer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/xml/helper-observer.cpp') diff --git a/src/xml/helper-observer.cpp b/src/xml/helper-observer.cpp index 022cad965..048d878a2 100644 --- a/src/xml/helper-observer.cpp +++ b/src/xml/helper-observer.cpp @@ -8,12 +8,12 @@ namespace XML { // Very simple observer that just emits a signal if anything happens to a node SignalObserver::SignalObserver() - : _oldsel(NULL) + : _oldsel(nullptr) {} SignalObserver::~SignalObserver() { - set(NULL); // if _oldsel!=nullptr, remove observer and decrease refcount + set(nullptr); // if _oldsel!=nullptr, remove observer and decrease refcount } // Add this observer to the SPObject and remove it from any previous object @@ -27,7 +27,7 @@ void SignalObserver::set(SPObject* o) _oldsel->getRepr()->removeObserver(*this); } sp_object_unref(_oldsel); - _oldsel = NULL; + _oldsel = nullptr; } if(o) { if (o->getRepr()) { -- cgit v1.2.3