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/selection-describer.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/selection-describer.cpp') diff --git a/src/selection-describer.cpp b/src/selection-describer.cpp index caa83fb94..9cc7c0928 100644 --- a/src/selection-describer.cpp +++ b/src/selection-describer.cpp @@ -112,7 +112,7 @@ void SelectionDescriber::_updateMessageFromSelection(Inkscape::Selection *select _context.set(Inkscape::NORMAL_MESSAGE, _when_nothing); } else { SPItem *item = items[0]; - g_assert(item != NULL); + g_assert(item != nullptr); SPObject *layer = selection->layers()->layerForObject(item); SPObject *root = selection->layers()->currentRoot(); @@ -143,7 +143,7 @@ void SelectionDescriber::_updateMessageFromSelection(Inkscape::Selection *select // Parent name SPObject *parent = item->parent; gchar const *parent_label = parent->getId(); - gchar *parent_name = NULL; + gchar *parent_name = nullptr; if (parent_label) { char *quoted_parent_label = xml_quote_strdup(parent_label); parent_name = g_strdup_printf(_("%s"), quoted_parent_label); @@ -175,7 +175,7 @@ void SelectionDescriber::_updateMessageFromSelection(Inkscape::Selection *select if (items.size()==1) { // one item char *item_desc = item->detailedDescription(); - bool isUse = dynamic_cast(item) != NULL; + bool isUse = dynamic_cast(item) != nullptr; if (isUse && dynamic_cast(item->firstChild())) { _context.setF(Inkscape::NORMAL_MESSAGE, "%s%s. %s. %s.", item_desc, in_phrase, @@ -185,7 +185,7 @@ void SelectionDescriber::_updateMessageFromSelection(Inkscape::Selection *select item_desc, in_phrase, _("Remove from symbols tray to edit symbol")); } else { - SPOffset *offset = (isUse) ? NULL : dynamic_cast(item); + SPOffset *offset = (isUse) ? nullptr : dynamic_cast(item); if (isUse || (offset && offset->sourceHref)) { _context.setF(Inkscape::NORMAL_MESSAGE, "%s%s. %s. %s.", item_desc, in_phrase, @@ -224,7 +224,7 @@ void SelectionDescriber::_updateMessageFromSelection(Inkscape::Selection *select g_free(terms); // indicate all, some, or none filtered - gchar *filt_str = NULL; + gchar *filt_str = nullptr; int n_filt = count_filtered(items); //all filtered if (n_filt) { filt_str = g_strdup_printf(ngettext("; %d filtered object ", @@ -236,11 +236,11 @@ void SelectionDescriber::_updateMessageFromSelection(Inkscape::Selection *select _context.setF(Inkscape::NORMAL_MESSAGE, "%s%s%s. %s.", objects_str, filt_str, in_phrase, _when_selected); if (objects_str) { g_free(objects_str); - objects_str = 0; + objects_str = nullptr; } if (filt_str) { g_free(filt_str); - filt_str = 0; + filt_str = nullptr; } } -- cgit v1.2.3