]> sigrok.org Git - pulseview.git/commitdiff
Use the 'default' keyword where applicable. This patch
authorSoeren Apel <redacted>
Tue, 16 Feb 2016 20:15:03 +0000 (21:15 +0100)
committerSoeren Apel <redacted>
Tue, 16 Feb 2016 20:15:03 +0000 (21:15 +0100)
 was initially created using clang-tidy:

  clang-tidy -checks="-*,moderize-use-default" -fix

However, the resulting patch only wanted to alter the
definitions in the .cpp file. I think it makes more
sense to remove the definitions completely and just
add "= default" to the declarations in the header file.

16 files changed:
pv/data/signaldata.cpp
pv/data/signaldata.hpp
pv/devicemanager.cpp
pv/devicemanager.hpp
pv/prop/bool.cpp
pv/prop/bool.hpp
pv/prop/double.cpp
pv/prop/double.hpp
pv/prop/enum.cpp
pv/prop/enum.hpp
pv/prop/int.cpp
pv/prop/int.hpp
pv/view/analogsignal.cpp
pv/view/analogsignal.hpp
pv/view/logicsignal.cpp
pv/view/logicsignal.hpp

index 6a4c6d926bf6e3d071d03b24515aaf63ed916c65..6baeac7c6f16e2c9a8a24c0e9cf6cc4dbf73ba4c 100644 (file)
@@ -23,9 +23,5 @@
 namespace pv {
 namespace data {
 
-SignalData::SignalData()
-{
-}
-
 } // namespace data
 } // namespace pv
index ff30cf1a0eee15a33e2c9ca269f89d5e729755c9..4b356100e3642a966526e200db7497166a280355 100644 (file)
@@ -33,7 +33,7 @@ class Segment;
 class SignalData
 {
 public:
-       SignalData();
+       SignalData() = default;
        virtual ~SignalData() {}
 
 public:
index b11e60c7705a3c89f137047d903b164de08521c1..41f2ae9c5f5bc6346aff24b895062d1e8d51ae53 100644 (file)
@@ -65,10 +65,6 @@ DeviceManager::DeviceManager(shared_ptr<Context> context) :
                driver_scan(entry.second, map<const ConfigKey *, VariantBase>());
 }
 
-DeviceManager::~DeviceManager()
-{
-}
-
 const std::shared_ptr<sigrok::Context>& DeviceManager::context() const
 {
        return context_;
index 33e784de5f564f9c35968806e274e12da528b423..d0d11cbd4d7095bcf7f1b3fede305bd83a8a711e 100644 (file)
@@ -50,7 +50,7 @@ class DeviceManager
 public:
        DeviceManager(std::shared_ptr<sigrok::Context> context);
 
-       ~DeviceManager();
+       ~DeviceManager() = default;
 
        const std::shared_ptr<sigrok::Context>& context() const;
 
index 3e201cc4c6a1ffc8bdec2b940a8686fef9dc5e94..3281de78cbf90841e7480c238fa8781ebeef9c36 100644 (file)
@@ -33,10 +33,6 @@ Bool::Bool(QString name, Getter getter, Setter setter) :
 {
 }
 
-Bool::~Bool()
-{
-}
-
 QWidget* Bool::get_widget(QWidget *parent, bool auto_commit)
 {
        if (check_box_)
index 6d32da7ef1f05286f534123c498a81f975ae2d8f..dada54dbf4816ceb71c81af36393257ab7180f6f 100644 (file)
@@ -35,7 +35,7 @@ class Bool : public Property
 public:
        Bool(QString name, Getter getter, Setter setter);
 
-       virtual ~Bool();
+       virtual ~Bool() = default;
 
        QWidget* get_widget(QWidget *parent, bool auto_commit);
        bool labeled_widget() const;
index c5ab1db4e28b5a83b98f33f030fc0124b4bef727..f4e6e443a5bb6f2e7dcf27fe29053f6daed50090 100644 (file)
@@ -46,10 +46,6 @@ Double::Double(QString name,
 {
 }
 
-Double::~Double()
-{
-}
-
 QWidget* Double::get_widget(QWidget *parent, bool auto_commit)
 {
        if (spin_box_)
index b62d1fa62f13e62b389d8d46fcacd0c00cad9c18..dc119bdb36e40c421421869e3e9610cc700157cb 100644 (file)
@@ -43,7 +43,7 @@ public:
                Getter getter,
                Setter setter);
 
-       virtual ~Double();
+       virtual ~Double() = default;
 
        QWidget* get_widget(QWidget *parent, bool auto_commit);
 
index 06e4d76f1098e5f6967b57eeee81ba591d72de45..71ed19e6e2c12de2ff5cc4900417e8a46cd0357d 100644 (file)
@@ -39,10 +39,6 @@ Enum::Enum(QString name,
 {
 }
 
-Enum::~Enum()
-{
-}
-
 QWidget* Enum::get_widget(QWidget *parent, bool auto_commit)
 {
        if (selector_)
index 63f78af0d272c89215c1b770fa40a5a1b0c59bab..0ae8a9c65950dace7499d825f4b1d8e98e62a5dc 100644 (file)
@@ -43,7 +43,7 @@ public:
        Enum(QString name, std::vector<std::pair<Glib::VariantBase, QString> > values,
                Getter getter, Setter setter);
 
-       virtual ~Enum();
+       virtual ~Enum() = default;
 
        QWidget* get_widget(QWidget *parent, bool auto_commit);
 
index e750e9fa9d8ec15757801c2809de31bbba196ef6..fd3bfe4708e6a0cb95832e81643421945de5a5eb 100644 (file)
@@ -45,10 +45,6 @@ Int::Int(QString name,
 {
 }
 
-Int::~Int()
-{
-}
-
 QWidget* Int::get_widget(QWidget *parent, bool auto_commit)
 {
        int64_t int_val = 0, range_min = 0;
index 60c9d51305a55997659efde3cc59c3ad290ac185..baf7dd7e1a8007fc7f7aafca7f5eaf4e2ab8df89 100644 (file)
@@ -41,7 +41,7 @@ public:
                boost::optional< std::pair<int64_t, int64_t> > range,
                Getter getter, Setter setter);
 
-       virtual ~Int();
+       virtual ~Int() = default;
 
        QWidget* get_widget(QWidget *parent, bool auto_commit);
 
index 2597a8f38445959051cadbdeae26ed7eb9f3ef8f..30cf5abf33a6dc5ac888c1fe89aa2ddd470fd6e4 100644 (file)
@@ -66,10 +66,6 @@ AnalogSignal::AnalogSignal(
        set_colour(SignalColours[channel_->index() % countof(SignalColours)]);
 }
 
-AnalogSignal::~AnalogSignal()
-{
-}
-
 shared_ptr<pv::data::SignalData> AnalogSignal::data() const
 {
        return data_;
index 938d92d5b5c8d7e086fcef406ab66403fbc37b63..06867a557db644f82fe5d01a7a16634a3420c10d 100644 (file)
@@ -47,7 +47,7 @@ public:
                std::shared_ptr<sigrok::Channel> channel,
                std::shared_ptr<pv::data::Analog> data);
 
-       virtual ~AnalogSignal();
+       virtual ~AnalogSignal() = default;
 
        std::shared_ptr<pv::data::SignalData> data() const;
 
index 78bfdec517667646c35f87c212d5cc4ab5ca2f7d..5584a1fcb70a0fb334e85b2d2165a6b965efabfe 100644 (file)
@@ -126,10 +126,6 @@ LogicSignal::LogicSignal(
                                        trigger_match_ = match->type();
 }
 
-LogicSignal::~LogicSignal()
-{
-}
-
 shared_ptr<pv::data::SignalData> LogicSignal::data() const
 {
        return data_;
index d34b65e755a399540ff96ee965b1f73d93a930c5..fc0dcabb26c15233eb4cce4f7b88fd2995f4045a 100644 (file)
@@ -69,7 +69,7 @@ public:
                std::shared_ptr<sigrok::Channel> channel,
                std::shared_ptr<pv::data::Logic> data);
 
-       virtual ~LogicSignal();
+       virtual ~LogicSignal() = default;
 
        std::shared_ptr<pv::data::SignalData> data() const;