From f4349fb3e45bd44cef0e2b69af4c9b4cf35dcf43 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Fri, 15 Jun 2018 12:46:15 +0200 Subject: =?UTF-8?q?Run=20clang-tidy=E2=80=99s=20modernize-use-nullptr=20pa?= =?UTF-8?q?ss.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This replaces all NULL or 0 with nullptr when assigned to or returned as a pointer. --- src/helper/action.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/helper/action.cpp') diff --git a/src/helper/action.cpp b/src/helper/action.cpp index 48e051ada..6e44487f9 100644 --- a/src/helper/action.cpp +++ b/src/helper/action.cpp @@ -45,8 +45,8 @@ sp_action_init (SPAction *action) action->sensitive = 0; action->active = 0; action->context = Inkscape::ActionContext(); - action->id = action->name = action->tip = NULL; - action->image = NULL; + action->id = action->name = action->tip = nullptr; + action->image = nullptr; new (&action->signal_perform) sigc::signal(); new (&action->signal_set_sensitive) sigc::signal(); @@ -86,7 +86,7 @@ sp_action_new(Inkscape::ActionContext const &context, const gchar *image, Inkscape::Verb * verb) { - SPAction *action = (SPAction *)g_object_new(SP_TYPE_ACTION, NULL); + SPAction *action = (SPAction *)g_object_new(SP_TYPE_ACTION, nullptr); action->context = context; action->sensitive = TRUE; @@ -131,7 +131,7 @@ public: */ void sp_action_perform(SPAction *action, void * /*data*/) { - g_return_if_fail (action != NULL); + g_return_if_fail (action != nullptr); g_return_if_fail (SP_IS_ACTION (action)); Inkscape::Debug::EventTracker tracker(action); @@ -144,7 +144,7 @@ void sp_action_perform(SPAction *action, void * /*data*/) void sp_action_set_active (SPAction *action, unsigned int active) { - g_return_if_fail (action != NULL); + g_return_if_fail (action != nullptr); g_return_if_fail (SP_IS_ACTION (action)); action->signal_set_active.emit(active); @@ -156,7 +156,7 @@ sp_action_set_active (SPAction *action, unsigned int active) void sp_action_set_sensitive (SPAction *action, unsigned int sensitive) { - g_return_if_fail (action != NULL); + g_return_if_fail (action != nullptr); g_return_if_fail (SP_IS_ACTION (action)); action->signal_set_sensitive.emit(sensitive); @@ -165,7 +165,7 @@ sp_action_set_sensitive (SPAction *action, unsigned int sensitive) void sp_action_set_name (SPAction *action, Glib::ustring const &name) { - g_return_if_fail (action != NULL); + g_return_if_fail (action != nullptr); g_return_if_fail (SP_IS_ACTION (action)); g_free(action->name); -- cgit v1.2.3