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/extension/param/description.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/extension/param/description.cpp') diff --git a/src/extension/param/description.cpp b/src/extension/param/description.cpp index cf94918f7..d795514c3 100644 --- a/src/extension/param/description.cpp +++ b/src/extension/param/description.cpp @@ -37,15 +37,15 @@ ParamDescription::ParamDescription(const gchar * name, Inkscape::XML::Node * xml, AppearanceMode mode) : Parameter(name, text, description, hidden, indent, ext) - , _value(NULL) + , _value(nullptr) , _mode(mode) { // construct the text content by concatenating all (non-empty) text nodes, // removing all other nodes (e.g. comment nodes) and replacing elements with "
" Glib::ustring value; Inkscape::XML::Node * cur_child = xml->firstChild(); - while (cur_child != NULL) { - if (cur_child->type() == XML::TEXT_NODE && cur_child->content() != NULL) { + while (cur_child != nullptr) { + if (cur_child->type() == XML::TEXT_NODE && cur_child->content() != nullptr) { value += cur_child->content(); } else if (cur_child->type() == XML::ELEMENT_NODE && !g_strcmp0(cur_child->name(), "extension:br")) { value += "
"; @@ -71,8 +71,8 @@ ParamDescription::ParamDescription(const gchar * name, // translate if underscored version (_param) was used if (g_str_has_prefix(xml->name(), "extension:_")) { const gchar * context = xml->attribute("msgctxt"); - if (context != NULL) { - value = g_dpgettext2(NULL, context, value.c_str()); + if (context != nullptr) { + value = g_dpgettext2(nullptr, context, value.c_str()); } else { value = _(value.c_str()); } @@ -91,10 +91,10 @@ Gtk::Widget * ParamDescription::get_widget (SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal * /*changeSignal*/) { if (_hidden) { - return NULL; + return nullptr; } - if (_value == NULL) { - return NULL; + if (_value == nullptr) { + return nullptr; } Glib::ustring newtext = _value; -- cgit v1.2.3