summaryrefslogtreecommitdiffstats
path: root/src/object/sp-guide.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-guide.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-guide.cpp')
-rw-r--r--src/object/sp-guide.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/object/sp-guide.cpp b/src/object/sp-guide.cpp
index 19aced5c0..eb0b27ab4 100644
--- a/src/object/sp-guide.cpp
+++ b/src/object/sp-guide.cpp
@@ -47,7 +47,7 @@ using std::vector;
SPGuide::SPGuide()
: SPObject()
- , label(NULL)
+ , label(nullptr)
, locked(0)
, normal_to_line(Geom::Point(0.,1.))
, point_on_line(Geom::Point(0.,0.))
@@ -106,7 +106,7 @@ void SPGuide::set(unsigned int key, const gchar *value) {
if (value) {
this->label = g_strdup(value);
} else {
- this->label = NULL;
+ this->label = nullptr;
}
this->set_label(this->label, false);
@@ -220,7 +220,7 @@ SPGuide *SPGuide::createSPGuide(SPDocument *doc, Geom::Point const &pt1, Geom::P
sp_repr_set_point(repr, "position", Geom::Point( newx, newy ));
sp_repr_set_point(repr, "orientation", n);
- SPNamedView *namedview = sp_document_namedview(doc, NULL);
+ SPNamedView *namedview = sp_document_namedview(doc, nullptr);
if (namedview) {
if (namedview->lockguides) {
repr->setAttribute("inkscape:locked", "true");
@@ -299,7 +299,7 @@ void SPGuide::showSPGuide()
void SPGuide::hideSPGuide(SPCanvas *canvas)
{
- g_assert(canvas != NULL);
+ g_assert(canvas != nullptr);
g_assert(SP_IS_CANVAS(canvas));
for(std::vector<SPGuideLine *>::iterator it = this->views.begin(); it != this->views.end(); ++it) {
if (canvas == SP_CANVAS_ITEM(*it)->canvas) {
@@ -324,7 +324,7 @@ void SPGuide::hideSPGuide()
void SPGuide::sensitize(SPCanvas *canvas, bool sensitive)
{
- g_assert(canvas != NULL);
+ g_assert(canvas != nullptr);
g_assert(SP_IS_CANVAS(canvas));
for(std::vector<SPGuideLine *>::const_iterator it = this->views.begin(); it != this->views.end(); ++it) {
@@ -479,12 +479,12 @@ char* SPGuide::description(bool const verbose) const
using Geom::X;
using Geom::Y;
- char *descr = NULL;
+ char *descr = nullptr;
if ( !this->document ) {
// Guide has probably been deleted and no longer has an attached namedview.
descr = g_strdup(_("Deleted"));
} else {
- SPNamedView *namedview = sp_document_namedview(this->document, NULL);
+ SPNamedView *namedview = sp_document_namedview(this->document, nullptr);
Inkscape::Util::Quantity x_q = Inkscape::Util::Quantity(this->point_on_line[X], "px");
Inkscape::Util::Quantity y_q = Inkscape::Util::Quantity(this->point_on_line[Y], "px");