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/live_effects/parameter | |
| 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/live_effects/parameter')
26 files changed, 57 insertions, 57 deletions
diff --git a/src/live_effects/parameter/array.cpp b/src/live_effects/parameter/array.cpp index 7470f54cd..3c1498fc3 100644 --- a/src/live_effects/parameter/array.cpp +++ b/src/live_effects/parameter/array.cpp @@ -57,7 +57,7 @@ ArrayParam<std::vector<Satellite > >::readsvg(const gchar * str) } gchar ** strarray = g_strsplit(str, "@", 0); gchar ** iter = strarray; - while (*iter != NULL) { + while (*iter != nullptr) { gchar ** strsubarray = g_strsplit(*iter, ",", 8); if (*strsubarray[7]) {//steps always > 0 Satellite *satellite = new Satellite(); diff --git a/src/live_effects/parameter/array.h b/src/live_effects/parameter/array.h index be19889b3..156de2f81 100644 --- a/src/live_effects/parameter/array.h +++ b/src/live_effects/parameter/array.h @@ -46,14 +46,14 @@ public: } Gtk::Widget * param_newWidget() override { - return NULL; + return nullptr; } bool param_readSVGValue(const gchar * strvalue) override { _vector.clear(); gchar ** strarray = g_strsplit(strvalue, "|", 0); gchar ** iter = strarray; - while (*iter != NULL) { + while (*iter != nullptr) { _vector.push_back( readsvg(*iter) ); iter++; } diff --git a/src/live_effects/parameter/bool.cpp b/src/live_effects/parameter/bool.cpp index bfbda2bfd..2e8c4dbcc 100644 --- a/src/live_effects/parameter/bool.cpp +++ b/src/live_effects/parameter/bool.cpp @@ -84,7 +84,7 @@ BoolParam::param_newWidget() checkwdg->set_undo_parameters(SP_VERB_DIALOG_LIVE_PATH_EFFECT, _("Change bool parameter")); return dynamic_cast<Gtk::Widget *> (checkwdg); } else { - return NULL; + return nullptr; } } diff --git a/src/live_effects/parameter/colorpicker.cpp b/src/live_effects/parameter/colorpicker.cpp index d4ebdaa1c..ec2b18389 100644 --- a/src/live_effects/parameter/colorpicker.cpp +++ b/src/live_effects/parameter/colorpicker.cpp @@ -43,7 +43,7 @@ ColorPickerParam::param_set_default() static guint32 sp_read_color_alpha(gchar const *str, guint32 def) { guint32 val = 0; - if (str == NULL) return def; + if (str == nullptr) return def; while ((*str <= ' ') && *str) str++; if (!*str) return def; diff --git a/src/live_effects/parameter/hidden.cpp b/src/live_effects/parameter/hidden.cpp index 5a21f572b..fd062d277 100644 --- a/src/live_effects/parameter/hidden.cpp +++ b/src/live_effects/parameter/hidden.cpp @@ -69,7 +69,7 @@ HiddenParam::param_getDefaultSVGValue() const Gtk::Widget * HiddenParam::param_newWidget() { - return NULL; + return nullptr; } void diff --git a/src/live_effects/parameter/item.cpp b/src/live_effects/parameter/item.cpp index 2107a5912..c22a3df33 100644 --- a/src/live_effects/parameter/item.cpp +++ b/src/live_effects/parameter/item.cpp @@ -40,7 +40,7 @@ ItemParam::ItemParam( const Glib::ustring& label, const Glib::ustring& tip, Effect* effect, const gchar * default_value) : Parameter(label, tip, key, wr, effect), changed(true), - href(NULL), + href(nullptr), ref( (SPObject*)effect->getLPEObj() ) { last_transform = Geom::identity(); @@ -154,7 +154,7 @@ ItemParam::addCanvasIndicators(SPLPEItem const*/*lpeitem*/, std::vector<Geom::Pa void ItemParam::start_listening(SPObject * to) { - if ( to == NULL ) { + if ( to == nullptr ) { return; } linked_delete_connection = to->connectDelete(sigc::mem_fun(*this, &ItemParam::linked_delete)); @@ -188,7 +188,7 @@ ItemParam::remove_link() if (href) { ref.detach(); g_free(href); - href = NULL; + href = nullptr; } } diff --git a/src/live_effects/parameter/message.cpp b/src/live_effects/parameter/message.cpp index 03eb2219f..a6e919558 100644 --- a/src/live_effects/parameter/message.cpp +++ b/src/live_effects/parameter/message.cpp @@ -20,7 +20,7 @@ MessageParam::MessageParam( const Glib::ustring& label, const Glib::ustring& tip message(default_message), defmessage(default_message) { - _label = NULL; + _label = nullptr; _min_height = -1; } diff --git a/src/live_effects/parameter/originalitem.cpp b/src/live_effects/parameter/originalitem.cpp index 52e4c2fd8..820c4d6b9 100644 --- a/src/live_effects/parameter/originalitem.cpp +++ b/src/live_effects/parameter/originalitem.cpp @@ -105,7 +105,7 @@ OriginalItemParam::on_select_original_button_click() { SPDesktop *desktop = SP_ACTIVE_DESKTOP; SPItem *original = ref.getObject(); - if (desktop == NULL || original == NULL) { + if (desktop == nullptr || original == nullptr) { return; } Inkscape::Selection *selection = desktop->getSelection(); diff --git a/src/live_effects/parameter/originalitem.h b/src/live_effects/parameter/originalitem.h index 4b285f8e1..d070161ac 100644 --- a/src/live_effects/parameter/originalitem.h +++ b/src/live_effects/parameter/originalitem.h @@ -23,7 +23,7 @@ public: Inkscape::UI::Widget::Registry* wr, Effect* effect); ~OriginalItemParam() override; - bool linksToItem() const { return (href != NULL); } + bool linksToItem() const { return (href != nullptr); } SPItem * getObject() const { return ref.getObject(); } Gtk::Widget * param_newWidget() override; diff --git a/src/live_effects/parameter/originalitemarray.cpp b/src/live_effects/parameter/originalitemarray.cpp index 5a0d67d26..3116b1f9c 100644 --- a/src/live_effects/parameter/originalitemarray.cpp +++ b/src/live_effects/parameter/originalitemarray.cpp @@ -323,7 +323,7 @@ void OriginalItemArrayParam::unlink(ItemAndActive* to) to->ref.detach(); if (to->href) { g_free(to->href); - to->href = NULL; + to->href = nullptr; } } @@ -398,12 +398,12 @@ bool OriginalItemArrayParam::param_readSVGValue(const gchar* strvalue) _store->clear(); gchar ** strarray = g_strsplit(strvalue, "|", 0); - for (gchar ** iter = strarray; *iter != NULL; iter++) { + for (gchar ** iter = strarray; *iter != nullptr; iter++) { if ((*iter)[0] == '#') { gchar ** substrarray = g_strsplit(*iter, ",", 0); ItemAndActive* w = new ItemAndActive((SPObject *)param_effect->getLPEObj()); w->href = g_strdup(*substrarray); - w->actived = *(substrarray+1) != NULL && (*(substrarray+1))[0] == '1'; + w->actived = *(substrarray+1) != nullptr && (*(substrarray+1))[0] == '1'; w->linked_changed_connection = w->ref.changedSignal().connect(sigc::bind<ItemAndActive *>(sigc::mem_fun(*this, &OriginalItemArrayParam::linked_changed), w)); w->ref.attach(URI(w->href)); diff --git a/src/live_effects/parameter/originalitemarray.h b/src/live_effects/parameter/originalitemarray.h index edb5a3be5..968aeaff0 100644 --- a/src/live_effects/parameter/originalitemarray.h +++ b/src/live_effects/parameter/originalitemarray.h @@ -32,7 +32,7 @@ namespace LivePathEffect { class ItemAndActive { public: ItemAndActive(SPObject *owner) - : href(NULL), + : href(nullptr), ref(owner), actived(true) { diff --git a/src/live_effects/parameter/originalpath.cpp b/src/live_effects/parameter/originalpath.cpp index 018e1e69e..5ad5546da 100644 --- a/src/live_effects/parameter/originalpath.cpp +++ b/src/live_effects/parameter/originalpath.cpp @@ -90,7 +90,7 @@ OriginalPathParam::param_newWidget() void OriginalPathParam::linked_modified_callback(SPObject *linked_obj, guint /*flags*/) { - SPCurve *curve = NULL; + SPCurve *curve = nullptr; if (SP_IS_SHAPE(linked_obj)) { if (_from_original_d) { curve = SP_SHAPE(linked_obj)->getCurveForEdit(); @@ -102,7 +102,7 @@ OriginalPathParam::linked_modified_callback(SPObject *linked_obj, guint /*flags* curve = SP_TEXT(linked_obj)->getNormalizedBpath(); } - if (curve == NULL) { + if (curve == nullptr) { // curve invalid, set empty pathvector _pathvector = Geom::PathVector(); } else { @@ -128,7 +128,7 @@ OriginalPathParam::on_select_original_button_click() { SPDesktop *desktop = SP_ACTIVE_DESKTOP; SPItem *original = ref.getObject(); - if (desktop == NULL || original == NULL) { + if (desktop == nullptr || original == nullptr) { return; } Inkscape::Selection *selection = desktop->getSelection(); diff --git a/src/live_effects/parameter/originalpath.h b/src/live_effects/parameter/originalpath.h index bd7b10741..4432d063d 100644 --- a/src/live_effects/parameter/originalpath.h +++ b/src/live_effects/parameter/originalpath.h @@ -24,7 +24,7 @@ public: Effect* effect); ~OriginalPathParam() override; - bool linksToPath() const { return (href != NULL); } + bool linksToPath() const { return (href != nullptr); } SPItem * getObject() const { return ref.getObject(); } Gtk::Widget * param_newWidget() override; diff --git a/src/live_effects/parameter/originalpatharray.cpp b/src/live_effects/parameter/originalpatharray.cpp index 2091c4d71..f9e56c8f3 100644 --- a/src/live_effects/parameter/originalpatharray.cpp +++ b/src/live_effects/parameter/originalpatharray.cpp @@ -363,7 +363,7 @@ void OriginalPathArrayParam::unlink(PathAndDirectionAndVisible* to) to->_pathvector = Geom::PathVector(); if (to->href) { g_free(to->href); - to->href = NULL; + to->href = nullptr; } } @@ -424,7 +424,7 @@ void OriginalPathArrayParam::setPathVector(SPObject *linked_obj, guint /*flags*/ if (!to) { return; } - SPCurve *curve = NULL; + SPCurve *curve = nullptr; if (SP_IS_SHAPE(linked_obj)) { SPLPEItem * lpe_item = SP_LPE_ITEM(linked_obj); if (_from_original_d) { @@ -451,7 +451,7 @@ void OriginalPathArrayParam::setPathVector(SPObject *linked_obj, guint /*flags*/ curve = SP_TEXT(linked_obj)->getNormalizedBpath(); } - if (curve == NULL) { + if (curve == nullptr) { // curve invalid, set empty pathvector to->_pathvector = Geom::PathVector(); } else { @@ -483,14 +483,14 @@ bool OriginalPathArrayParam::param_readSVGValue(const gchar* strvalue) _store->clear(); gchar ** strarray = g_strsplit(strvalue, "|", 0); - for (gchar ** iter = strarray; *iter != NULL; iter++) { + for (gchar ** iter = strarray; *iter != nullptr; iter++) { if ((*iter)[0] == '#') { gchar ** substrarray = g_strsplit(*iter, ",", 0); PathAndDirectionAndVisible* w = new PathAndDirectionAndVisible((SPObject *)param_effect->getLPEObj()); w->href = g_strdup(*substrarray); - w->reversed = *(substrarray+1) != NULL && (*(substrarray+1))[0] == '1'; + w->reversed = *(substrarray+1) != nullptr && (*(substrarray+1))[0] == '1'; //Like this to make backwards compatible, new value added in 0.93 - w->visibled = *(substrarray+2) == NULL || (*(substrarray+2))[0] == '1'; + w->visibled = *(substrarray+2) == nullptr || (*(substrarray+2))[0] == '1'; w->linked_changed_connection = w->ref.changedSignal().connect(sigc::bind<PathAndDirectionAndVisible *>(sigc::mem_fun(*this, &OriginalPathArrayParam::linked_changed), w)); w->ref.attach(URI(w->href)); diff --git a/src/live_effects/parameter/originalpatharray.h b/src/live_effects/parameter/originalpatharray.h index 92edff103..23a41215f 100644 --- a/src/live_effects/parameter/originalpatharray.h +++ b/src/live_effects/parameter/originalpatharray.h @@ -32,7 +32,7 @@ namespace LivePathEffect { class PathAndDirectionAndVisible { public: PathAndDirectionAndVisible(SPObject *owner) - : href(NULL), + : href(nullptr), ref(owner), _pathvector(Geom::PathVector()), reversed(false), diff --git a/src/live_effects/parameter/parameter.cpp b/src/live_effects/parameter/parameter.cpp index a175359f0..acfe159ab 100644 --- a/src/live_effects/parameter/parameter.cpp +++ b/src/live_effects/parameter/parameter.cpp @@ -196,7 +196,7 @@ ScalarParam::param_newWidget() } return dynamic_cast<Gtk::Widget *> (rsu); } else { - return NULL; + return nullptr; } } diff --git a/src/live_effects/parameter/path.cpp b/src/live_effects/parameter/path.cpp index ab385daa6..649d3a1ef 100644 --- a/src/live_effects/parameter/path.cpp +++ b/src/live_effects/parameter/path.cpp @@ -64,7 +64,7 @@ PathParam::PathParam( const Glib::ustring& label, const Glib::ustring& tip, _pathvector(), _pwd2(), must_recalculate_pwd2(false), - href(NULL), + href(nullptr), ref( (SPObject*)effect->getLPEObj() ) { defvalue = g_strdup(default_value); @@ -198,8 +198,8 @@ PathParam::param_newWidget() Gtk::Label* pLabel = Gtk::manage(new Gtk::Label(param_label)); static_cast<Gtk::HBox*>(_widget)->pack_start(*pLabel, true, true); pLabel->set_tooltip_text(param_tooltip); - Gtk::Image * pIcon = NULL; - Gtk::Button * pButton = NULL; + Gtk::Image * pIcon = nullptr; + Gtk::Button * pButton = nullptr; if (_edit_button) { pIcon = Gtk::manage(new Gtk::Image()); pIcon->set_from_icon_name( INKSCAPE_ICON("tool-node-editor"), Gtk::ICON_SIZE_BUTTON); @@ -398,7 +398,7 @@ PathParam::emit_changed() void PathParam::start_listening(SPObject * to) { - if ( to == NULL ) { + if ( to == nullptr ) { return; } linked_delete_connection = to->connectDelete(sigc::mem_fun(*this, &PathParam::linked_delete)); @@ -432,7 +432,7 @@ PathParam::remove_link() if (href) { ref.detach(); g_free(href); - href = NULL; + href = nullptr; } } @@ -457,7 +457,7 @@ void PathParam::linked_transformed(Geom::Affine const *rel_transf, SPItem *moved void PathParam::linked_modified_callback(SPObject *linked_obj, guint /*flags*/) { - SPCurve *curve = NULL; + SPCurve *curve = nullptr; if (SP_IS_SHAPE(linked_obj)) { if (_from_original_d) { curve = SP_SHAPE(linked_obj)->getCurveForEdit(); @@ -469,7 +469,7 @@ PathParam::linked_modified_callback(SPObject *linked_obj, guint /*flags*/) curve = SP_TEXT(linked_obj)->getNormalizedBpath(); } - if (curve == NULL) { + if (curve == nullptr) { // curve invalid, set default value _pathvector = sp_svg_read_pathv(defvalue); } else { @@ -492,7 +492,7 @@ void PathParam::on_edit_button_click() { SPItem * item = SP_ACTIVE_DESKTOP->getSelection()->singleItem(); - if (item != NULL) { + if (item != nullptr) { param_editOncanvas(item, SP_ACTIVE_DESKTOP); } } @@ -505,7 +505,7 @@ PathParam::paste_param_path(const char *svgd) // remove possible link to path remove_link(); SPItem * item = SP_ACTIVE_DESKTOP->getSelection()->singleItem(); - if (item != NULL) { + if (item != nullptr) { Geom::PathVector path_clipboard = sp_svg_read_pathv(svgd); path_clipboard *= item->i2doc_affine().inverse(); svgd = sp_svg_write_path( path_clipboard ); diff --git a/src/live_effects/parameter/point.cpp b/src/live_effects/parameter/point.cpp index fe0699a19..a195d663b 100644 --- a/src/live_effects/parameter/point.cpp +++ b/src/live_effects/parameter/point.cpp @@ -25,7 +25,7 @@ PointParam::PointParam( const Glib::ustring& label, const Glib::ustring& tip, : Parameter(label, tip, key, wr, effect), defvalue(default_value), liveupdate(live_update), - _knot_entity(NULL) + _knot_entity(nullptr) { knot_shape = SP_KNOT_SHAPE_DIAMOND; knot_mode = SP_KNOT_MODE_XOR; @@ -185,7 +185,7 @@ PointParam::set_oncanvas_looks(SPKnotShapeType shape, SPKnotModeType mode, guint class PointParamKnotHolderEntity : public KnotHolderEntity { public: PointParamKnotHolderEntity(PointParam *p) { this->pparam = p; } - ~PointParamKnotHolderEntity() override { this->pparam->_knot_entity = NULL;} + ~PointParamKnotHolderEntity() override { this->pparam->_knot_entity = nullptr;} void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state) override; Geom::Point knot_get() const override; @@ -239,7 +239,7 @@ PointParam::addKnotHolderEntities(KnotHolder *knotholder, SPItem *item) { _knot_entity = new PointParamKnotHolderEntity(this); // TODO: can we ditch handleTip() etc. because we have access to handle_tip etc. itself??? - _knot_entity->create(NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, handleTip(), knot_shape, knot_mode, knot_color); + _knot_entity->create(nullptr, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, handleTip(), knot_shape, knot_mode, knot_color); knotholder->add(_knot_entity); } diff --git a/src/live_effects/parameter/point.h b/src/live_effects/parameter/point.h index 4f93b5354..7c620f502 100644 --- a/src/live_effects/parameter/point.h +++ b/src/live_effects/parameter/point.h @@ -29,7 +29,7 @@ public: const Glib::ustring& key, Inkscape::UI::Widget::Registry* wr, Effect* effect, - const gchar *handle_tip = NULL,// tip for automatically associated on-canvas handle + const gchar *handle_tip = nullptr,// tip for automatically associated on-canvas handle Geom::Point default_value = Geom::Point(0,0), bool live_update = true ); ~PointParam() override; diff --git a/src/live_effects/parameter/powerstrokepointarray.cpp b/src/live_effects/parameter/powerstrokepointarray.cpp index cf4adc5fd..0857deab5 100644 --- a/src/live_effects/parameter/powerstrokepointarray.cpp +++ b/src/live_effects/parameter/powerstrokepointarray.cpp @@ -39,7 +39,7 @@ PowerStrokePointArrayParam::~PowerStrokePointArrayParam() Gtk::Widget * PowerStrokePointArrayParam::param_newWidget() { - return NULL; + return nullptr; } void PowerStrokePointArrayParam::param_transform_multiply(Geom::Affine const &postmul, bool /*set*/) @@ -280,7 +280,7 @@ void PowerStrokePointArrayParam::addKnotHolderEntities(KnotHolder *knotholder, S { for (unsigned int i = 0; i < _vector.size(); ++i) { PowerStrokePointArrayParamKnotHolderEntity *e = new PowerStrokePointArrayParamKnotHolderEntity(this, i); - e->create(NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, + e->create(nullptr, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _("<b>Stroke width control point</b>: drag to alter the stroke width. <b>Ctrl+click</b> adds a control point, <b>Ctrl+Alt+click</b> deletes it, <b>Shift+click</b> launches width dialog."), knot_shape, knot_mode, knot_color); knotholder->add(e); diff --git a/src/live_effects/parameter/satellitesarray.cpp b/src/live_effects/parameter/satellitesarray.cpp index c6f5492d1..10ad0df45 100644 --- a/src/live_effects/parameter/satellitesarray.cpp +++ b/src/live_effects/parameter/satellitesarray.cpp @@ -26,7 +26,7 @@ SatellitesArrayParam::SatellitesArrayParam(const Glib::ustring &label, const Glib::ustring &key, Inkscape::UI::Widget::Registry *wr, Effect *effect) - : ArrayParam<std::vector<Satellite> >(label, tip, key, wr, effect, 0), _knoth(NULL) + : ArrayParam<std::vector<Satellite> >(label, tip, key, wr, effect, 0), _knoth(nullptr) { _knot_shape = SP_KNOT_SHAPE_DIAMOND; _knot_mode = SP_KNOT_MODE_XOR; @@ -36,7 +36,7 @@ SatellitesArrayParam::SatellitesArrayParam(const Glib::ustring &label, _global_knot_hide = false; _current_zoom = 0; _effectType = FILLET_CHAMFER; - _last_pathvector_satellites = NULL; + _last_pathvector_satellites = nullptr; param_widget_is_visible(false); } @@ -269,7 +269,7 @@ void SatellitesArrayParam::addKnotHolderEntities(KnotHolder *knotholder, "<b>Ctrl+Alt+Click</b> reset"); } FilletChamferKnotHolderEntity *e = new FilletChamferKnotHolderEntity(this, index); - e->create(NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _(tip),_knot_shape, _knot_mode, _knot_color); + e->create(nullptr, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _(tip),_knot_shape, _knot_mode, _knot_color); knotholder->add(e); } index++; diff --git a/src/live_effects/parameter/satellitesarray.h b/src/live_effects/parameter/satellitesarray.h index 30e196e41..005ea63ff 100644 --- a/src/live_effects/parameter/satellitesarray.h +++ b/src/live_effects/parameter/satellitesarray.h @@ -38,7 +38,7 @@ public: Gtk::Widget *param_newWidget() override { - return NULL; + return nullptr; } virtual void setHelperSize(int hs); void addKnotHolderEntities(KnotHolder *knotholder, SPItem *item) override; @@ -87,7 +87,7 @@ public: FilletChamferKnotHolderEntity(SatellitesArrayParam *p, size_t index); ~FilletChamferKnotHolderEntity() override { - _pparam->_knoth = NULL; + _pparam->_knoth = nullptr; } void knot_set(Geom::Point const &p, Geom::Point const &origin, diff --git a/src/live_effects/parameter/text.h b/src/live_effects/parameter/text.h index cd1176bc2..fda470638 100644 --- a/src/live_effects/parameter/text.h +++ b/src/live_effects/parameter/text.h @@ -73,9 +73,9 @@ private: class TextParamInternal : public TextParam { public: TextParamInternal(Effect* effect) : - TextParam("", "", "", NULL, effect) {} + TextParam("", "", "", nullptr, effect) {} - Gtk::Widget * param_newWidget() override { return NULL; } + Gtk::Widget * param_newWidget() override { return nullptr; } }; } //namespace LivePathEffect diff --git a/src/live_effects/parameter/togglebutton.cpp b/src/live_effects/parameter/togglebutton.cpp index bb9d9a90e..b5f7f5998 100644 --- a/src/live_effects/parameter/togglebutton.cpp +++ b/src/live_effects/parameter/togglebutton.cpp @@ -29,7 +29,7 @@ ToggleButtonParam::ToggleButtonParam( const Glib::ustring& label, const Glib::us : Parameter(label, tip, key, wr, effect), value(default_value), defvalue(default_value), inactive_label(inactive_label), _icon_active(_icon_active), _icon_inactive(_icon_inactive), _icon_size(_icon_size) { - checkwdg = NULL; + checkwdg = nullptr; } ToggleButtonParam::~ToggleButtonParam() @@ -107,7 +107,7 @@ ToggleButtonParam::param_newWidget() _icon_inactive = _icon_active; } gtk_widget_show(box_button); - GtkWidget *icon_button = NULL; + GtkWidget *icon_button = nullptr; if(!value){ icon_button = gtk_image_new_from_icon_name(_icon_inactive, _icon_size); } else { @@ -156,7 +156,7 @@ ToggleButtonParam::refresh_button() } } if ( _icon_active ) { - GdkPixbuf * icon_pixbuf = NULL; + GdkPixbuf * icon_pixbuf = nullptr; Gtk::Image *im = dynamic_cast<Gtk::Image*>(children[0]); Gtk::IconSize is(_icon_size); if (!im) return; diff --git a/src/live_effects/parameter/togglebutton.h b/src/live_effects/parameter/togglebutton.h index 7476698f5..29ee72203 100644 --- a/src/live_effects/parameter/togglebutton.h +++ b/src/live_effects/parameter/togglebutton.h @@ -31,8 +31,8 @@ public: Effect* effect, bool default_value = false, const Glib::ustring& inactive_label = "", - char const * icon_active = NULL, - char const * icon_inactive = NULL, + char const * icon_active = nullptr, + char const * icon_inactive = nullptr, GtkIconSize icon_size = GTK_ICON_SIZE_SMALL_TOOLBAR); ~ToggleButtonParam() override; diff --git a/src/live_effects/parameter/vector.cpp b/src/live_effects/parameter/vector.cpp index 56895276c..8018ed618 100644 --- a/src/live_effects/parameter/vector.cpp +++ b/src/live_effects/parameter/vector.cpp @@ -216,11 +216,11 @@ void VectorParam::addKnotHolderEntities(KnotHolder *knotholder, SPItem *item) { VectorParamKnotHolderEntity_Origin *origin_e = new VectorParamKnotHolderEntity_Origin(this); - origin_e->create(NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, handleTip(), ori_knot_shape, ori_knot_mode, ori_knot_color); + origin_e->create(nullptr, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, handleTip(), ori_knot_shape, ori_knot_mode, ori_knot_color); knotholder->add(origin_e); VectorParamKnotHolderEntity_Vector *vector_e = new VectorParamKnotHolderEntity_Vector(this); - vector_e->create(NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, handleTip(), vec_knot_shape, vec_knot_mode, vec_knot_color); + vector_e->create(nullptr, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, handleTip(), vec_knot_shape, vec_knot_mode, vec_knot_color); knotholder->add(vector_e); } |
