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/ui/tools/spiral-tool.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/ui/tools/spiral-tool.cpp')
| -rw-r--r-- | src/ui/tools/spiral-tool.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/ui/tools/spiral-tool.cpp b/src/ui/tools/spiral-tool.cpp index 61ee1026b..4b7743678 100644 --- a/src/ui/tools/spiral-tool.cpp +++ b/src/ui/tools/spiral-tool.cpp @@ -56,7 +56,7 @@ const std::string SpiralTool::prefsPath = "/tools/shapes/spiral"; SpiralTool::SpiralTool() : ToolBase(cursor_spiral_xpm) - , spiral(NULL) + , spiral(nullptr) , revo(3) , exp(1) , t0(0) @@ -80,7 +80,7 @@ SpiralTool::~SpiralTool() { this->sel_changed_connection.disconnect(); delete this->shape_editor; - this->shape_editor = NULL; + this->shape_editor = nullptr; /* fixme: This is necessary because we do not grab */ if (this->spiral) { @@ -168,7 +168,7 @@ bool SpiralTool::root_handler(GdkEvent* event) { GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK ), - NULL, event->button.time); + nullptr, event->button.time); ret = TRUE; } break; @@ -229,7 +229,7 @@ bool SpiralTool::root_handler(GdkEvent* event) { selection->clear(); } - this->item_to_select = NULL; + this->item_to_select = nullptr; ret = TRUE; sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), event->button.time); } @@ -246,7 +246,7 @@ bool SpiralTool::root_handler(GdkEvent* event) { case GDK_KEY_Meta_R: sp_event_show_modifier_tip(this->defaultMessageContext(), event, _("<b>Ctrl</b>: snap angle"), - NULL, + nullptr, _("<b>Alt</b>: lock spiral radius")); break; @@ -385,7 +385,7 @@ void SpiralTool::drag(Geom::Point const &p, guint state) { void SpiralTool::finishItem() { this->message_context->clear(); - if (this->spiral != NULL) { + if (this->spiral != nullptr) { if (this->spiral->rad == 0) { this->cancel(); // Don't allow the creating of zero sized spiral, for example when the start and and point snap to the snap grid point return; @@ -393,7 +393,7 @@ void SpiralTool::finishItem() { spiral->set_shape(); spiral->updateRepr(SP_OBJECT_WRITE_EXT); - spiral->doWriteTransform(spiral->transform, NULL, true); + spiral->doWriteTransform(spiral->transform, nullptr, true); this->desktop->canvas->endForcedFullRedraws(); @@ -401,7 +401,7 @@ void SpiralTool::finishItem() { DocumentUndo::done(this->desktop->getDocument(), SP_VERB_CONTEXT_SPIRAL, _("Create spiral")); - this->spiral = NULL; + this->spiral = nullptr; } } @@ -409,15 +409,15 @@ void SpiralTool::cancel() { this->desktop->getSelection()->clear(); sp_canvas_item_ungrab(SP_CANVAS_ITEM(this->desktop->acetate), 0); - if (this->spiral != NULL) { + if (this->spiral != nullptr) { this->spiral->deleteObject(); - this->spiral = NULL; + this->spiral = nullptr; } this->within_tolerance = false; this->xp = 0; this->yp = 0; - this->item_to_select = NULL; + this->item_to_select = nullptr; this->desktop->canvas->endForcedFullRedraws(); |
