diff options
| author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2018-06-15 17:02:56 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marcjeanmougin@free.fr> | 2018-06-18 12:27:01 +0000 |
| commit | 004e50d84773242a000f5cadb89466bbc793e1a8 (patch) | |
| tree | 019c32e65caa08fe7cf90b521787531a7b1d2225 /src/ui/widget | |
| parent | Run clang-tidy’s modernize-use-nullptr pass. (diff) | |
| download | inkscape-004e50d84773242a000f5cadb89466bbc793e1a8.tar.gz inkscape-004e50d84773242a000f5cadb89466bbc793e1a8.zip | |
Run clang-tidy’s modernize-use-equals-default pass.
This replaces empty constructors and destructors with the default
keyword.
Diffstat (limited to 'src/ui/widget')
| -rw-r--r-- | src/ui/widget/addtoicon.h | 2 | ||||
| -rw-r--r-- | src/ui/widget/attr-widget.h | 2 | ||||
| -rw-r--r-- | src/ui/widget/clipmaskicon.h | 2 | ||||
| -rw-r--r-- | src/ui/widget/color-scales.cpp | 2 | ||||
| -rw-r--r-- | src/ui/widget/highlight-picker.cpp | 3 | ||||
| -rw-r--r-- | src/ui/widget/imagetoggler.h | 2 | ||||
| -rw-r--r-- | src/ui/widget/ink-spinscale.h | 4 | ||||
| -rw-r--r-- | src/ui/widget/insertordericon.h | 2 | ||||
| -rw-r--r-- | src/ui/widget/layertypeicon.h | 2 | ||||
| -rw-r--r-- | src/ui/widget/page-sizer.cpp | 3 | ||||
| -rw-r--r-- | src/ui/widget/page-sizer.h | 2 | ||||
| -rw-r--r-- | src/ui/widget/panel.cpp | 3 | ||||
| -rw-r--r-- | src/ui/widget/preferences-widget.h | 2 | ||||
| -rw-r--r-- | src/ui/widget/registered-widget.h | 2 | ||||
| -rw-r--r-- | src/ui/widget/registry.cpp | 2 | ||||
| -rw-r--r-- | src/ui/widget/rotateable.cpp | 3 | ||||
| -rw-r--r-- | src/ui/widget/selected-style.cpp | 6 | ||||
| -rw-r--r-- | src/ui/widget/spinbutton.h | 2 | ||||
| -rw-r--r-- | src/ui/widget/style-subject.cpp | 9 | ||||
| -rw-r--r-- | src/ui/widget/unit-menu.cpp | 3 |
20 files changed, 24 insertions, 34 deletions
diff --git a/src/ui/widget/addtoicon.h b/src/ui/widget/addtoicon.h index f79d12cdf..60c773e84 100644 --- a/src/ui/widget/addtoicon.h +++ b/src/ui/widget/addtoicon.h @@ -24,7 +24,7 @@ namespace Widget { class AddToIcon : public Gtk::CellRendererPixbuf { public: AddToIcon(); - ~AddToIcon() override {}; + ~AddToIcon() override = default;; Glib::PropertyProxy<bool> property_active() { return _property_active.get_proxy(); } Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > property_pixbuf_on(); diff --git a/src/ui/widget/attr-widget.h b/src/ui/widget/attr-widget.h index 8dbff8874..d50bdc65a 100644 --- a/src/ui/widget/attr-widget.h +++ b/src/ui/widget/attr-widget.h @@ -134,7 +134,7 @@ public: {} virtual ~AttrWidget() - {} + = default; virtual Glib::ustring get_as_attribute() const = 0; virtual void set_from_attribute(SPObject*) = 0; diff --git a/src/ui/widget/clipmaskicon.h b/src/ui/widget/clipmaskicon.h index d355a1caf..25725e33a 100644 --- a/src/ui/widget/clipmaskicon.h +++ b/src/ui/widget/clipmaskicon.h @@ -24,7 +24,7 @@ namespace Widget { class ClipMaskIcon : public Gtk::CellRendererPixbuf { public: ClipMaskIcon(); - ~ClipMaskIcon() override {}; + ~ClipMaskIcon() override = default;; Glib::PropertyProxy<int> property_active() { return _property_active.get_proxy(); } Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > property_pixbuf_on(); diff --git a/src/ui/widget/color-scales.cpp b/src/ui/widget/color-scales.cpp index 620e77cbf..57555a53d 100644 --- a/src/ui/widget/color-scales.cpp +++ b/src/ui/widget/color-scales.cpp @@ -729,7 +729,7 @@ ColorScalesFactory::ColorScalesFactory(SPColorScalesMode submode) { } -ColorScalesFactory::~ColorScalesFactory() {} +ColorScalesFactory::~ColorScalesFactory() = default; Gtk::Widget *ColorScalesFactory::createWidget(Inkscape::UI::SelectedColor &color) const { diff --git a/src/ui/widget/highlight-picker.cpp b/src/ui/widget/highlight-picker.cpp index 3d8ab50ea..a3abc32bb 100644 --- a/src/ui/widget/highlight-picker.cpp +++ b/src/ui/widget/highlight-picker.cpp @@ -28,8 +28,7 @@ HighlightPicker::HighlightPicker() : } HighlightPicker::~HighlightPicker() -{ -} += default; void HighlightPicker::get_preferred_height_vfunc(Gtk::Widget& widget, int& min_h, diff --git a/src/ui/widget/imagetoggler.h b/src/ui/widget/imagetoggler.h index f537cc74c..86c12bc03 100644 --- a/src/ui/widget/imagetoggler.h +++ b/src/ui/widget/imagetoggler.h @@ -25,7 +25,7 @@ namespace Widget { class ImageToggler : public Gtk::CellRendererPixbuf { public: ImageToggler( char const *on, char const *off); - ~ImageToggler() override {}; + ~ImageToggler() override = default;; sigc::signal<void, const Glib::ustring&> signal_toggled() { return _signal_toggled;} sigc::signal<void, GdkEvent const *> signal_pre_toggle() { return _signal_pre_toggle; } diff --git a/src/ui/widget/ink-spinscale.h b/src/ui/widget/ink-spinscale.h index 7cb82c92a..a5807f8dc 100644 --- a/src/ui/widget/ink-spinscale.h +++ b/src/ui/widget/ink-spinscale.h @@ -31,7 +31,7 @@ class InkScale : public Gtk::Scale { public: InkScale(Glib::RefPtr<Gtk::Adjustment>, Gtk::SpinButton* spinbutton); - ~InkScale() override {}; + ~InkScale() override = default;; void set_label(Glib::ustring label); @@ -71,7 +71,7 @@ class InkSpinScale : public Gtk::Box // Create an InkSpinScale with a preexisting adjustment. InkSpinScale(Glib::RefPtr<Gtk::Adjustment>); - ~InkSpinScale() override {}; + ~InkSpinScale() override = default;; void set_label(Glib::ustring label); void set_digits(int digits); diff --git a/src/ui/widget/insertordericon.h b/src/ui/widget/insertordericon.h index 5c4c19603..b736007f4 100644 --- a/src/ui/widget/insertordericon.h +++ b/src/ui/widget/insertordericon.h @@ -25,7 +25,7 @@ namespace Widget { class InsertOrderIcon : public Gtk::CellRendererPixbuf { public: InsertOrderIcon(); - ~InsertOrderIcon() override {}; + ~InsertOrderIcon() override = default;; Glib::PropertyProxy<int> property_active() { return _property_active.get_proxy(); } Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > property_pixbuf_on(); diff --git a/src/ui/widget/layertypeicon.h b/src/ui/widget/layertypeicon.h index 5f7e79c29..e84bef261 100644 --- a/src/ui/widget/layertypeicon.h +++ b/src/ui/widget/layertypeicon.h @@ -24,7 +24,7 @@ namespace Widget { class LayerTypeIcon : public Gtk::CellRendererPixbuf { public: LayerTypeIcon(); - ~LayerTypeIcon() override {}; + ~LayerTypeIcon() override = default;; sigc::signal<void, const Glib::ustring&> signal_toggled() { return _signal_toggled;} sigc::signal<void, GdkEvent const *> signal_pre_toggle() { return _signal_pre_toggle; } diff --git a/src/ui/widget/page-sizer.cpp b/src/ui/widget/page-sizer.cpp index 579049d29..b8eeca00d 100644 --- a/src/ui/widget/page-sizer.cpp +++ b/src/ui/widget/page-sizer.cpp @@ -464,8 +464,7 @@ PageSizer::PageSizer(Registry & _wr) * Destructor */ PageSizer::~PageSizer() -{ -} += default; diff --git a/src/ui/widget/page-sizer.h b/src/ui/widget/page-sizer.h index 001c6a65d..edc9f5b0c 100644 --- a/src/ui/widget/page-sizer.h +++ b/src/ui/widget/page-sizer.h @@ -81,7 +81,7 @@ public: * Destructor */ virtual ~PaperSize() - {} + = default; /** * Name of this paper specification diff --git a/src/ui/widget/panel.cpp b/src/ui/widget/panel.cpp index 7b54995c1..73897aeb5 100644 --- a/src/ui/widget/panel.cpp +++ b/src/ui/widget/panel.cpp @@ -59,8 +59,7 @@ Panel::Panel(gchar const *prefs_path, int verb_num) : } Panel::~Panel() -{ -} += default; void Panel::present() { diff --git a/src/ui/widget/preferences-widget.h b/src/ui/widget/preferences-widget.h index 129a7b336..acd59fe94 100644 --- a/src/ui/widget/preferences-widget.h +++ b/src/ui/widget/preferences-widget.h @@ -251,7 +251,7 @@ class PrefColorPicker : public ColorPicker { public: PrefColorPicker() : ColorPicker("", "", 0, false) {}; - ~PrefColorPicker() override {}; + ~PrefColorPicker() override = default;; void init(Glib::ustring const &abel, Glib::ustring const &prefs_path, guint32 default_rgba); diff --git a/src/ui/widget/registered-widget.h b/src/ui/widget/registered-widget.h index bb0f6da8a..033ab9541 100644 --- a/src/ui/widget/registered-widget.h +++ b/src/ui/widget/registered-widget.h @@ -83,7 +83,7 @@ protected: template< typename A, typename B, typename C, typename D, typename E , typename F, typename G> RegisteredWidget( A& a, B& b, C& c, D& d, E& e, F f, G& g): W( a, b, c, d, e, f, g) { construct(); } - ~RegisteredWidget() override {}; + ~RegisteredWidget() override = default;; void init_parent(const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, SPDocument *doc_in) { diff --git a/src/ui/widget/registry.cpp b/src/ui/widget/registry.cpp index ea8198422..9972e1acd 100644 --- a/src/ui/widget/registry.cpp +++ b/src/ui/widget/registry.cpp @@ -23,7 +23,7 @@ namespace Widget { Registry::Registry() : _updating(false) {} -Registry::~Registry() {} +Registry::~Registry() = default; bool Registry::isUpdating() diff --git a/src/ui/widget/rotateable.cpp b/src/ui/widget/rotateable.cpp index 0e290730d..64b37a07f 100644 --- a/src/ui/widget/rotateable.cpp +++ b/src/ui/widget/rotateable.cpp @@ -160,8 +160,7 @@ bool Rotateable::on_scroll(GdkEventScroll* event) return TRUE; } -Rotateable::~Rotateable() { -} +Rotateable::~Rotateable() = default; diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp index c0b0a7f56..b5fdc721d 100644 --- a/src/ui/widget/selected-style.cpp +++ b/src/ui/widget/selected-style.cpp @@ -1207,8 +1207,7 @@ RotateableSwatch::RotateableSwatch(SelectedStyle *parent, guint mode) : { } -RotateableSwatch::~RotateableSwatch() { -} +RotateableSwatch::~RotateableSwatch() = default; double RotateableSwatch::color_adjust(float *hsla, double by, guint32 cc, guint modifier) @@ -1408,8 +1407,7 @@ RotateableStrokeWidth::RotateableStrokeWidth(SelectedStyle *parent) : { } -RotateableStrokeWidth::~RotateableStrokeWidth() { -} +RotateableStrokeWidth::~RotateableStrokeWidth() = default; double RotateableStrokeWidth::value_adjust(double current, double by, guint /*modifier*/, bool final) diff --git a/src/ui/widget/spinbutton.h b/src/ui/widget/spinbutton.h index 28d9849a8..918e7047f 100644 --- a/src/ui/widget/spinbutton.h +++ b/src/ui/widget/spinbutton.h @@ -45,7 +45,7 @@ public: connect_signals(); }; - ~SpinButton() override {}; + ~SpinButton() override = default;; void setUnitMenu(UnitMenu* unit_menu) { _unit_menu = unit_menu; }; diff --git a/src/ui/widget/style-subject.cpp b/src/ui/widget/style-subject.cpp index 5eccc67cf..04de4b162 100644 --- a/src/ui/widget/style-subject.cpp +++ b/src/ui/widget/style-subject.cpp @@ -38,11 +38,9 @@ void StyleSubject::setDesktop(SPDesktop *desktop) { } } -StyleSubject::Selection::Selection() { -} +StyleSubject::Selection::Selection() = default; -StyleSubject::Selection::~Selection() { -} +StyleSubject::Selection::~Selection() = default; Inkscape::Selection *StyleSubject::Selection::_getSelection() const { SPDesktop *desktop = getDesktop(); @@ -105,8 +103,7 @@ StyleSubject::CurrentLayer::CurrentLayer() { _element = nullptr; } -StyleSubject::CurrentLayer::~CurrentLayer() { -} +StyleSubject::CurrentLayer::~CurrentLayer() = default; void StyleSubject::CurrentLayer::_setLayer(SPObject *layer) { _layer_release.disconnect(); diff --git a/src/ui/widget/unit-menu.cpp b/src/ui/widget/unit-menu.cpp index 423313a1f..fd10b567e 100644 --- a/src/ui/widget/unit-menu.cpp +++ b/src/ui/widget/unit-menu.cpp @@ -26,8 +26,7 @@ UnitMenu::UnitMenu() : _type(UNIT_TYPE_NONE) set_active(0); } -UnitMenu::~UnitMenu() { -} +UnitMenu::~UnitMenu() = default; bool UnitMenu::setUnitType(UnitType unit_type) { |
