summaryrefslogtreecommitdiffstats
path: root/src/object/sp-stop.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-stop.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-stop.cpp')
-rw-r--r--src/object/sp-stop.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/object/sp-stop.cpp b/src/object/sp-stop.cpp
index 58746c951..d016e6366 100644
--- a/src/object/sp-stop.cpp
+++ b/src/object/sp-stop.cpp
@@ -24,7 +24,7 @@
#include "svg/css-ostringstream.h"
SPStop::SPStop() : SPObject() {
- this->path_string = NULL;
+ this->path_string = nullptr;
this->offset = 0.0;
this->currentColor = false;
@@ -152,8 +152,8 @@ Inkscape::XML::Node* SPStop::write(Inkscape::XML::Document* xml_doc, Inkscape::X
}
os << ";stop-opacity:" << opacity;
repr->setAttribute("style", os.str().c_str());
- repr->setAttribute("stop-color", NULL);
- repr->setAttribute("stop-opacity", NULL);
+ repr->setAttribute("stop-color", nullptr);
+ repr->setAttribute("stop-opacity", nullptr);
sp_repr_set_css_double(repr, "offset", this->offset);
/* strictly speaking, offset an SVG <number> rather than a CSS one, but exponents make no sense
* for offset proportions. */
@@ -167,7 +167,7 @@ Inkscape::XML::Node* SPStop::write(Inkscape::XML::Document* xml_doc, Inkscape::X
// A stop might have some non-stop siblings
SPStop* SPStop::getNextStop() {
- SPStop *result = 0;
+ SPStop *result = nullptr;
for (SPObject* obj = getNext(); obj && !result; obj = obj->getNext()) {
if (SP_IS_STOP(obj)) {
@@ -179,7 +179,7 @@ SPStop* SPStop::getNextStop() {
}
SPStop* SPStop::getPrevStop() {
- SPStop *result = 0;
+ SPStop *result = nullptr;
for (SPObject* obj = getPrev(); obj; obj = obj->getPrev()) {
// The closest previous SPObject that is an SPStop *should* be ourself.
@@ -215,7 +215,7 @@ SPColor SPStop::getEffectiveColor() const {
SPColor ret;
if (currentColor) {
- char const *str = getStyleProperty("color", NULL);
+ char const *str = getStyleProperty("color", nullptr);
/* Default value: arbitrarily black. (SVG1.1 and CSS2 both say that the initial
* value depends on user agent, and don't give any further restrictions that I can
* see.) */
@@ -237,7 +237,7 @@ guint32 SPStop::get_rgba32() const {
* value depends on user agent, and don't give any further restrictions that I can
* see.) */
if (this->currentColor) {
- char const *str = this->getStyleProperty("color", NULL);
+ char const *str = this->getStyleProperty("color", nullptr);
if (str) {
rgb0 = sp_svg_read_color(str, rgb0);