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-ellipse.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 'src/object/sp-ellipse.cpp')
| -rw-r--r-- | src/object/sp-ellipse.cpp | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/src/object/sp-ellipse.cpp b/src/object/sp-ellipse.cpp index 74ade912c..f30a06ca1 100644 --- a/src/object/sp-ellipse.cpp +++ b/src/object/sp-ellipse.cpp @@ -281,11 +281,11 @@ Inkscape::XML::Node *SPGenericEllipse::write(Inkscape::XML::Document *xml_doc, I case SP_GENERIC_ELLIPSE_UNDEFINED: case SP_GENERIC_ELLIPSE_ARC: - repr->setAttribute("cx", NULL ); - repr->setAttribute("cy", NULL ); - repr->setAttribute("rx", NULL ); - repr->setAttribute("ry", NULL ); - repr->setAttribute("r", NULL ); + repr->setAttribute("cx", nullptr ); + repr->setAttribute("cy", nullptr ); + repr->setAttribute("rx", nullptr ); + repr->setAttribute("ry", nullptr ); + repr->setAttribute("r", nullptr ); if (flags & SP_OBJECT_WRITE_EXT) { @@ -302,7 +302,7 @@ Inkscape::XML::Node *SPGenericEllipse::write(Inkscape::XML::Document *xml_doc, I switch ( arc_type ) { case SP_GENERIC_ELLIPSE_ARC_TYPE_SLICE: - repr->setAttribute("sodipodi:open", NULL); // For backwards compat. + repr->setAttribute("sodipodi:open", nullptr); // For backwards compat. repr->setAttribute("sodipodi:arc-type", "slice"); break; case SP_GENERIC_ELLIPSE_ARC_TYPE_CHORD: @@ -318,10 +318,10 @@ Inkscape::XML::Node *SPGenericEllipse::write(Inkscape::XML::Document *xml_doc, I std::cerr << "SPGenericEllipse::write: unknown arc-type." << std::endl; } } else { - repr->setAttribute("sodipodi:end", NULL); - repr->setAttribute("sodipodi:start", NULL); - repr->setAttribute("sodipodi:open", NULL); - repr->setAttribute("sodipodi:arc-type", NULL); + repr->setAttribute("sodipodi:end", nullptr); + repr->setAttribute("sodipodi:start", nullptr); + repr->setAttribute("sodipodi:open", nullptr); + repr->setAttribute("sodipodi:arc-type", nullptr); } } @@ -333,18 +333,18 @@ Inkscape::XML::Node *SPGenericEllipse::write(Inkscape::XML::Document *xml_doc, I sp_repr_set_svg_length(repr, "cx", cx); sp_repr_set_svg_length(repr, "cy", cy); sp_repr_set_svg_length(repr, "r", rx); - repr->setAttribute("rx", NULL ); - repr->setAttribute("ry", NULL ); - repr->setAttribute("sodipodi:cx", NULL ); - repr->setAttribute("sodipodi:cy", NULL ); - repr->setAttribute("sodipodi:rx", NULL ); - repr->setAttribute("sodipodi:ry", NULL ); - repr->setAttribute("sodipodi:end", NULL ); - repr->setAttribute("sodipodi:start", NULL ); - repr->setAttribute("sodipodi:open", NULL ); - repr->setAttribute("sodipodi:arc-type", NULL); - repr->setAttribute("sodipodi:type", NULL ); - repr->setAttribute("d", NULL ); + repr->setAttribute("rx", nullptr ); + repr->setAttribute("ry", nullptr ); + repr->setAttribute("sodipodi:cx", nullptr ); + repr->setAttribute("sodipodi:cy", nullptr ); + repr->setAttribute("sodipodi:rx", nullptr ); + repr->setAttribute("sodipodi:ry", nullptr ); + repr->setAttribute("sodipodi:end", nullptr ); + repr->setAttribute("sodipodi:start", nullptr ); + repr->setAttribute("sodipodi:open", nullptr ); + repr->setAttribute("sodipodi:arc-type", nullptr); + repr->setAttribute("sodipodi:type", nullptr ); + repr->setAttribute("d", nullptr ); break; case SP_GENERIC_ELLIPSE_ELLIPSE: @@ -352,17 +352,17 @@ Inkscape::XML::Node *SPGenericEllipse::write(Inkscape::XML::Document *xml_doc, I sp_repr_set_svg_length(repr, "cy", cy); sp_repr_set_svg_length(repr, "rx", rx); sp_repr_set_svg_length(repr, "ry", ry); - repr->setAttribute("r", NULL ); - repr->setAttribute("sodipodi:cx", NULL ); - repr->setAttribute("sodipodi:cy", NULL ); - repr->setAttribute("sodipodi:rx", NULL ); - repr->setAttribute("sodipodi:ry", NULL ); - repr->setAttribute("sodipodi:end", NULL ); - repr->setAttribute("sodipodi:start", NULL ); - repr->setAttribute("sodipodi:open", NULL ); - repr->setAttribute("sodipodi:arc-type", NULL); - repr->setAttribute("sodipodi:type", NULL ); - repr->setAttribute("d", NULL ); + repr->setAttribute("r", nullptr ); + repr->setAttribute("sodipodi:cx", nullptr ); + repr->setAttribute("sodipodi:cy", nullptr ); + repr->setAttribute("sodipodi:rx", nullptr ); + repr->setAttribute("sodipodi:ry", nullptr ); + repr->setAttribute("sodipodi:end", nullptr ); + repr->setAttribute("sodipodi:start", nullptr ); + repr->setAttribute("sodipodi:open", nullptr ); + repr->setAttribute("sodipodi:arc-type", nullptr); + repr->setAttribute("sodipodi:type", nullptr ); + repr->setAttribute("d", nullptr ); break; default: @@ -434,7 +434,7 @@ void SPGenericEllipse::set_shape() this->normalize(); - SPCurve *c = NULL; + SPCurve *c = nullptr; // For simplicity, we use a circle with center (0, 0) and radius 1 for our calculations. Geom::Circle circle(0, 0, 1); @@ -663,7 +663,7 @@ bool SPGenericEllipse::set_elliptical_path_attribute(Inkscape::XML::Node *repr) g_free(d); } else { - repr->setAttribute("d", NULL); + repr->setAttribute("d", nullptr); } return true; |
