summaryrefslogtreecommitdiffstats
path: root/src/object/sp-switch.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/object/sp-switch.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/object/sp-switch.cpp')
-rw-r--r--src/object/sp-switch.cpp10
1 files changed, 5 insertions, 5 deletions
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 <sigc++/adaptors/bind.h>
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<SPObject*> SPSwitch::_childList(bool add_ref, SPObject::Action actio
SPObject *child = _evaluateFirst();
std::vector<SPObject*> 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) {