diff options
| author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2018-06-15 10:46:15 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marcjeanmougin@free.fr> | 2018-06-18 12:27:01 +0000 |
| commit | f4349fb3e45bd44cef0e2b69af4c9b4cf35dcf43 (patch) | |
| tree | 7c6044fd3a17a2665841959dac9b3b2110b27924 /src/extension/param/float.cpp | |
| parent | Run clang-tidy’s modernize-use-override pass. (diff) | |
| download | inkscape-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/float.cpp')
| -rw-r--r-- | src/extension/param/float.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/extension/param/float.cpp b/src/extension/param/float.cpp index 1dd3f073b..aaf871068 100644 --- a/src/extension/param/float.cpp +++ b/src/extension/param/float.cpp @@ -40,27 +40,27 @@ ParamFloat::ParamFloat(const gchar * name, , _min(0.0) , _max(10.0) { - const gchar * defaultval = NULL; - if (xml->firstChild() != NULL) { + const gchar * defaultval = nullptr; + if (xml->firstChild() != nullptr) { defaultval = xml->firstChild()->content(); } - if (defaultval != NULL) { - _value = g_ascii_strtod (defaultval,NULL); + if (defaultval != nullptr) { + _value = g_ascii_strtod (defaultval,nullptr); } const char * maxval = xml->attribute("max"); - if (maxval != NULL) { - _max = g_ascii_strtod (maxval,NULL); + if (maxval != nullptr) { + _max = g_ascii_strtod (maxval,nullptr); } const char * minval = xml->attribute("min"); - if (minval != NULL) { - _min = g_ascii_strtod (minval,NULL); + if (minval != nullptr) { + _min = g_ascii_strtod (minval,nullptr); } _precision = 1; const char * precision = xml->attribute("precision"); - if (precision != NULL) { + if (precision != nullptr) { _precision = atoi(precision); } @@ -136,7 +136,7 @@ public: describing the parameter. */ ParamFloatAdjustment (ParamFloat * param, SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) : Gtk::Adjustment(0.0, param->min(), param->max(), 0.1, 1.0, 0), _pref(param), _doc(doc), _node(node), _changeSignal(changeSignal) { - this->set_value(_pref->get(NULL, NULL) /* \todo fix */); + this->set_value(_pref->get(nullptr, nullptr) /* \todo fix */); this->signal_value_changed().connect(sigc::mem_fun(this, &ParamFloatAdjustment::val_changed)); return; }; @@ -154,7 +154,7 @@ void ParamFloatAdjustment::val_changed(void) { //std::cout << "Value Changed to: " << this->get_value() << std::endl; _pref->set(this->get_value(), _doc, _node); - if (_changeSignal != NULL) { + if (_changeSignal != nullptr) { _changeSignal->emit(); } return; @@ -168,7 +168,7 @@ void ParamFloatAdjustment::val_changed(void) Gtk::Widget * ParamFloat::get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) { if (_hidden) { - return NULL; + return nullptr; } Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, Parameter::GUI_PARAM_WIDGETS_SPACING)); @@ -179,7 +179,7 @@ Gtk::Widget * ParamFloat::get_widget(SPDocument * doc, Inkscape::XML::Node * nod if (_mode == FULL) { Glib::ustring text; - if (_text != NULL) + if (_text != nullptr) text = _text; UI::Widget::SpinScale *scale = new UI::Widget::SpinScale(text, fadjust, _precision); scale->set_size_request(400, -1); |
