summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/arc-tool.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/ui/tools/arc-tool.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/ui/tools/arc-tool.cpp')
-rw-r--r--src/ui/tools/arc-tool.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/ui/tools/arc-tool.cpp b/src/ui/tools/arc-tool.cpp
index 34b29f3bb..e0378ff03 100644
--- a/src/ui/tools/arc-tool.cpp
+++ b/src/ui/tools/arc-tool.cpp
@@ -64,7 +64,7 @@ const std::string ArcTool::prefsPath = "/tools/shapes/arc";
ArcTool::ArcTool()
: ToolBase(cursor_ellipse_xpm)
- , arc(NULL)
+ , arc(nullptr)
{
}
@@ -82,7 +82,7 @@ ArcTool::~ArcTool() {
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->arc) {
@@ -166,7 +166,7 @@ bool ArcTool::root_handler(GdkEvent* event) {
sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate),
GDK_KEY_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK,
- NULL, event->button.time);
+ nullptr, event->button.time);
handled = true;
m.unSetup();
}
@@ -224,7 +224,7 @@ bool ArcTool::root_handler(GdkEvent* event) {
this->xp = 0;
this->yp = 0;
- this->item_to_select = NULL;
+ this->item_to_select = nullptr;
handled = true;
}
sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), event->button.time);
@@ -244,7 +244,7 @@ bool ArcTool::root_handler(GdkEvent* event) {
sp_event_show_modifier_tip(this->defaultMessageContext(), event,
_("<b>Ctrl</b>: make circle or integer-ratio ellipse, snap arc/segment angle"),
_("<b>Shift</b>: draw around the starting point"),
- NULL);
+ nullptr);
}
break;
@@ -412,14 +412,14 @@ void ArcTool::drag(Geom::Point pt, guint state) {
void ArcTool::finishItem() {
this->message_context->clear();
- if (this->arc != NULL) {
+ if (this->arc != nullptr) {
if (this->arc->rx.computed == 0 || this->arc->ry.computed == 0) {
this->cancel(); // Don't allow the creating of zero sized arc, for example when the start and and point snap to the snap grid point
return;
}
this->arc->updateRepr();
- this->arc->doWriteTransform(this->arc->transform, NULL, true);
+ this->arc->doWriteTransform(this->arc->transform, nullptr, true);
desktop->canvas->endForcedFullRedraws();
@@ -427,7 +427,7 @@ void ArcTool::finishItem() {
DocumentUndo::done(desktop->getDocument(), SP_VERB_CONTEXT_ARC, _("Create ellipse"));
- this->arc = NULL;
+ this->arc = nullptr;
}
}
@@ -435,15 +435,15 @@ void ArcTool::cancel() {
desktop->getSelection()->clear();
sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), 0);
- if (this->arc != NULL) {
+ if (this->arc != nullptr) {
this->arc->deleteObject();
- this->arc = NULL;
+ this->arc = nullptr;
}
this->within_tolerance = false;
this->xp = 0;
this->yp = 0;
- this->item_to_select = NULL;
+ this->item_to_select = nullptr;
desktop->canvas->endForcedFullRedraws();