summaryrefslogtreecommitdiffstats
path: root/src/extension/param/description.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/extension/param/description.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/extension/param/description.cpp')
-rw-r--r--src/extension/param/description.cpp16
1 files changed, 8 insertions, 8 deletions
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 <extension:br> elements with "<br/>"
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 += "<br/>";
@@ -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<void> * /*changeSignal*/)
{
if (_hidden) {
- return NULL;
+ return nullptr;
}
- if (_value == NULL) {
- return NULL;
+ if (_value == nullptr) {
+ return nullptr;
}
Glib::ustring newtext = _value;