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/ui/dialog/livepatheffect-editor.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/ui/dialog/livepatheffect-editor.cpp') diff --git a/src/ui/dialog/livepatheffect-editor.cpp b/src/ui/dialog/livepatheffect-editor.cpp index 6cf7f807a..dd019cfba 100644 --- a/src/ui/dialog/livepatheffect-editor.cpp +++ b/src/ui/dialog/livepatheffect-editor.cpp @@ -92,16 +92,16 @@ LivePathEffectEditor::LivePathEffectEditor() deskTrack(), lpe_list_locked(false), lpe_changed(true), - effectwidget(NULL), + effectwidget(nullptr), status_label("", Gtk::ALIGN_CENTER), effectcontrol_frame(""), button_add(), button_remove(), button_up(), button_down(), - current_desktop(NULL), - current_lpeitem(NULL), - current_lperef(NULL) + current_desktop(nullptr), + current_lpeitem(nullptr), + current_lperef(nullptr) { Gtk::Box *contents = _getContents(); contents->set_spacing(4); @@ -190,7 +190,7 @@ LivePathEffectEditor::~LivePathEffectEditor() if (effectwidget) { effectcontrol_vbox.remove(*effectwidget); delete effectwidget; - effectwidget = NULL; + effectwidget = nullptr; } if (current_desktop) { @@ -209,7 +209,7 @@ LivePathEffectEditor::showParams(LivePathEffect::Effect& effect) if (effectwidget) { effectcontrol_vbox.remove(*effectwidget); delete effectwidget; - effectwidget = NULL; + effectwidget = nullptr; } effectwidget = effect.newWidget(); effectcontrol_frame.set_label(effect.getName()); @@ -241,7 +241,7 @@ LivePathEffectEditor::showText(Glib::ustring const &str) if (effectwidget) { effectcontrol_vbox.remove(*effectwidget); delete effectwidget; - effectwidget = NULL; + effectwidget = nullptr; } status_label.show(); @@ -271,7 +271,7 @@ LivePathEffectEditor::onSelectionChanged(Inkscape::Selection *sel) lpe_list_locked = false; return; } - current_lpeitem = NULL; + current_lpeitem = nullptr; effectlist_store->clear(); if ( sel && !sel->isEmpty() ) { @@ -388,7 +388,7 @@ LivePathEffectEditor::setDesktop(SPDesktop *desktop) onSelectionChanged(selection); } else { - onSelectionChanged(NULL); + onSelectionChanged(nullptr); } } @@ -453,7 +453,7 @@ LivePathEffectEditor::onAdd() gchar *id = g_strdup(item->getRepr()->attribute("id")); gchar *transform = g_strdup(item->getRepr()->attribute("transform")); item->deleteObject(false); - item = NULL; + item = nullptr; // run sp_selection_clone_original_path_lpe sel->cloneOriginalPathLPE(true); @@ -491,7 +491,7 @@ LivePathEffectEditor::onRemove() SPLPEItem *lpeitem = dynamic_cast(item); if ( lpeitem ) { lpeitem->removeCurrentPathEffect(false); - current_lperef = NULL; + current_lperef = nullptr; DocumentUndo::done( current_desktop->getDocument(), SP_VERB_DIALOG_LIVE_PATH_EFFECT, _("Remove path effect") ); lpe_list_locked = false; -- cgit v1.2.3