summaryrefslogtreecommitdiffstats
path: root/src/ui/toolbar/lpe-toolbar.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/toolbar/lpe-toolbar.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/toolbar/lpe-toolbar.cpp')
-rw-r--r--src/ui/toolbar/lpe-toolbar.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ui/toolbar/lpe-toolbar.cpp b/src/ui/toolbar/lpe-toolbar.cpp
index bed5ed4bf..b42c1ae0c 100644
--- a/src/ui/toolbar/lpe-toolbar.cpp
+++ b/src/ui/toolbar/lpe-toolbar.cpp
@@ -131,14 +131,14 @@ static void sp_lpetool_toolbox_sel_changed(Inkscape::Selection *selection, GObje
act->set_sensitive(true);
act->set_active( lpels->end_type.get_value() );
} else {
- g_object_set_data(tbl, "currentlpe", NULL);
- g_object_set_data(tbl, "currentlpeitem", NULL);
+ g_object_set_data(tbl, "currentlpe", nullptr);
+ g_object_set_data(tbl, "currentlpeitem", nullptr);
act->set_sensitive(false);
}
} else {
- g_object_set_data(tbl, "currentlpe", NULL);
- g_object_set_data(tbl, "currentlpeitem", NULL);
+ g_object_set_data(tbl, "currentlpe", nullptr);
+ g_object_set_data(tbl, "currentlpeitem", nullptr);
act->set_sensitive(false);
}
}
@@ -180,7 +180,7 @@ static void lpetool_unit_changed(GObject* tbl, int /* NotUsed */)
{
UnitTracker* tracker = reinterpret_cast<UnitTracker*>(g_object_get_data(tbl, "tracker"));
Unit const *unit = tracker->getActiveUnit();
- g_return_if_fail(unit != NULL);
+ g_return_if_fail(unit != nullptr);
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
prefs->setString("/tools/lpetool/unit", unit->abbr);
@@ -247,7 +247,7 @@ static void lpetool_open_lpe_dialog(GtkToggleAction *act, gpointer data)
SPDesktop *desktop = static_cast<SPDesktop *>(data);
if (tools_isactive(desktop, TOOLS_LPETOOL)) {
- sp_action_perform(Inkscape::Verb::get(SP_VERB_DIALOG_LIVE_PATH_EFFECT)->get_action(Inkscape::ActionContext(desktop)), NULL);
+ sp_action_perform(Inkscape::Verb::get(SP_VERB_DIALOG_LIVE_PATH_EFFECT)->get_action(Inkscape::ActionContext(desktop)), nullptr);
}
gtk_toggle_action_set_active(act, false);
}
@@ -260,7 +260,7 @@ void sp_lpetool_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GO
tracker->setActiveUnit(desktop->getNamedView()->display_units);
g_object_set_data(holder, "tracker", tracker);
Unit const *unit = tracker->getActiveUnit();
- g_return_if_fail(unit != NULL);
+ g_return_if_fail(unit != nullptr);
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
prefs->setString("/tools/lpetool/unit", unit->abbr);