diff options
| author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2018-06-15 10:46:15 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marcjeanmougin@free.fr> | 2018-06-18 12:27:01 +0000 |
| commit | f4349fb3e45bd44cef0e2b69af4c9b4cf35dcf43 (patch) | |
| tree | 7c6044fd3a17a2665841959dac9b3b2110b27924 /src/object/sp-path.cpp | |
| parent | Run clang-tidy’s modernize-use-override pass. (diff) | |
| download | inkscape-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 '')
| -rw-r--r-- | src/object/sp-path.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/object/sp-path.cpp b/src/object/sp-path.cpp index de31b45e2..51fa549e7 100644 --- a/src/object/sp-path.cpp +++ b/src/object/sp-path.cpp @@ -196,15 +196,15 @@ void SPPath::build(SPDocument *document, Inkscape::XML::Node *repr) { this->readAttr( "d" ); /* d is a required attribute */ - char const *d = this->getAttribute("d", NULL); + char const *d = this->getAttribute("d", nullptr); - if (d == NULL) { + if (d == nullptr) { // First see if calculating the path effect will generate "d": this->update_patheffect(true); - d = this->getAttribute("d", NULL); + d = this->getAttribute("d", nullptr); // I guess that didn't work, now we have nothing useful to write ("") - if (d == NULL) { + if (d == nullptr) { this->setKeyValue( sp_attribute_lookup("d"), ""); } } @@ -228,7 +228,7 @@ void SPPath::set(unsigned int key, const gchar* value) { curve->unref(); } } else { - this->setCurveBeforeLPE(NULL); + this->setCurveBeforeLPE(nullptr); } sp_lpe_item_update_patheffect(this, true, true); @@ -244,7 +244,7 @@ void SPPath::set(unsigned int key, const gchar* value) { curve->unref(); } } else { - this->setCurve(NULL); + this->setCurve(nullptr); } break; @@ -285,16 +285,16 @@ g_message("sp_path_write writes 'd' attribute"); repr->setAttribute("d", str); g_free(str); } else { - repr->setAttribute("d", NULL); + repr->setAttribute("d", nullptr); } if (flags & SP_OBJECT_WRITE_EXT) { - if ( this->_curve_before_lpe != NULL ) { + if ( this->_curve_before_lpe != nullptr ) { gchar *str = sp_svg_write_path(this->_curve_before_lpe->get_pathvector()); repr->setAttribute("inkscape:original-d", str); g_free(str); } else { - repr->setAttribute("inkscape:original-d", NULL); + repr->setAttribute("inkscape:original-d", nullptr); } } |
