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-switch.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/object/sp-switch.cpp') diff --git a/src/object/sp-switch.cpp b/src/object/sp-switch.cpp index d6ab1e904..88f3c46c7 100644 --- a/src/object/sp-switch.cpp +++ b/src/object/sp-switch.cpp @@ -21,7 +21,7 @@ #include SPSwitch::SPSwitch() : SPGroup() { - this->_cached_item = 0; + this->_cached_item = nullptr; } SPSwitch::~SPSwitch() { @@ -29,7 +29,7 @@ SPSwitch::~SPSwitch() { } SPObject *SPSwitch::_evaluateFirst() { - SPObject *first = 0; + SPObject *first = nullptr; for (auto& child: children) { if (SP_IS_ITEM(&child) && sp_item_evaluate(SP_ITEM(&child))) { @@ -48,7 +48,7 @@ std::vector SPSwitch::_childList(bool add_ref, SPObject::Action actio SPObject *child = _evaluateFirst(); std::vector x; - if (NULL == child) + if (nullptr == child) return x; if (add_ref) { @@ -120,11 +120,11 @@ void SPSwitch::_releaseItem(SPObject *obj, SPSwitch *selection) void SPSwitch::_releaseLastItem(SPObject *obj) { - if (NULL == this->_cached_item || this->_cached_item != obj) + if (nullptr == this->_cached_item || this->_cached_item != obj) return; this->_release_connection.disconnect(); - this->_cached_item = NULL; + this->_cached_item = nullptr; } void SPSwitch::_showChildren (Inkscape::Drawing &drawing, Inkscape::DrawingItem *ai, unsigned int key, unsigned int flags) { -- cgit v1.2.3