Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove useless declaration of default destructor.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 8 Mar 2021 20:49:33 +0000 (21:49 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 8 Mar 2021 21:17:49 +0000 (22:17 +0100)
Remove public destructors defined '=default' at declaration, unless
they are virtual and the enclosing class is derived somewhere.

36 files changed:
examples/cpp/app-chainsend/s4u-app-chainsend.cpp
examples/cpp/dht-kademlia/answer.hpp
include/simgrid/kernel/future.hpp
include/simgrid/kernel/routing/NetPoint.hpp
include/simgrid/kernel/routing/VivaldiZone.hpp
include/simgrid/kernel/routing/WifiZone.hpp
include/simgrid/s4u/Barrier.hpp
include/simgrid/s4u/Exec.hpp
include/simgrid/s4u/Io.hpp
src/instr/instr_paje_types.hpp
src/kernel/activity/ConditionVariableImpl.hpp
src/kernel/activity/SemaphoreImpl.hpp
src/mc/VisitedState.hpp
src/mc/checker/LivenessChecker.hpp
src/mc/checker/SafetyChecker.hpp
src/mc/checker/UdporChecker.hpp
src/mc/sosp/Region.hpp
src/mc/sosp/Snapshot.hpp
src/mc/udpor_global.hpp
src/msg/msg_private.hpp
src/plugins/dirty_page_tracking.cpp
src/plugins/host_load.cpp
src/plugins/link_energy.cpp
src/plugins/link_energy_wifi.cpp
src/plugins/link_load.cpp
src/plugins/vm/VmHostExt.hpp
src/plugins/vm/VmLiveMigration.hpp
src/smpi/include/smpi_host.hpp
src/smpi/include/smpi_info.hpp
src/surf/cpu_cas01.hpp
src/surf/network_cm02.hpp
src/surf/network_ib.hpp
src/surf/network_ns3.hpp
src/surf/network_smpi.hpp
src/surf/ptask_L07.hpp
src/xbt/config.cpp

index 040dcb0..2a38069 100644 (file)
@@ -21,13 +21,11 @@ public:
       : prev_(prev), next_(next), num_pieces(num_pieces)
   {
   }
-  ~ChainMessage() = default;
 };
 
 class FilePiece {
 public:
   FilePiece()  = default;
-  ~FilePiece() = default;
 };
 
 class Peer {
@@ -43,7 +41,6 @@ public:
   unsigned int total_pieces         = 0;
 
   Peer() { me = simgrid::s4u::Mailbox::by_name(simgrid::s4u::Host::current()->get_cname()); }
-  ~Peer()     = default;
 
   void joinChain()
   {
@@ -130,8 +127,6 @@ public:
       mailboxes.push_back(simgrid::s4u::Mailbox::by_name(name));
     }
   }
-
-  ~Broadcaster() = default;
 };
 
 static void peer()
index 6595284..7228312 100644 (file)
@@ -19,7 +19,6 @@ class Answer {
 
 public:
   explicit Answer(unsigned int destination_id) : destination_id_(destination_id) {}
-  virtual ~Answer() = default;
   unsigned int getDestinationId() const { return destination_id_; }
   size_t getSize() const { return nodes_.size(); }
   const std::vector<std::pair<unsigned int, unsigned int>>& getNodes() const { return nodes_; }
index ec2c7a4..897e4c2 100644 (file)
@@ -279,7 +279,6 @@ class Future {
 public:
   Future() = default;
   explicit Future(std::shared_ptr<FutureState<T>> state) : state_(std::move(state)) {}
-  ~Future() = default;
 
   // Move type:
   Future(Future&) = delete;
index fd1bcb2..e6cc4b3 100644 (file)
@@ -29,7 +29,6 @@ public:
   enum class Type { Host, Router, NetZone };
 
   NetPoint(const std::string& name, NetPoint::Type component_type, NetZoneImpl* netzone_p);
-  ~NetPoint() = default;
 
   // Our rank in the vertices_ array of the netzone that contains us.
   unsigned int id() const { return id_; }
index 2f05dfb..943c27e 100644 (file)
@@ -57,7 +57,6 @@ class XBT_PRIVATE Coords {
 public:
   static xbt::Extension<NetPoint, Coords> EXTENSION_ID;
   explicit Coords(NetPoint* host, const std::string& str);
-  virtual ~Coords() = default;
 
   std::vector<double> coords;
 };
index 23728e8..15cc9b0 100644 (file)
@@ -23,7 +23,6 @@ public:
   explicit WifiZone(NetZoneImpl* father, const std::string& name, resource::NetworkModel* netmodel);
   WifiZone(const WifiZone&) = delete;
   WifiZone& operator=(const WifiZone) = delete;
-  ~WifiZone() override                = default;
 
   void seal() override;
   void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
index a1f5770..f5d3fa5 100644 (file)
@@ -32,7 +32,6 @@ public:
   /** Creates a barrier for the given amount of actors */
   explicit Barrier(unsigned int expected_actors) : expected_actors_(expected_actors) {}
 #ifndef DOXYGEN
-  ~Barrier()              = default;
   Barrier(Barrier const&) = delete;
   Barrier& operator=(Barrier const&) = delete;
 #endif
index 566d601..0ae3e32 100644 (file)
@@ -45,11 +45,9 @@ protected:
   explicit Exec(kernel::activity::ExecImplPtr pimpl);
 
 public:
-  ~Exec() override = default;
 #ifndef DOXYGEN
   Exec(Exec const&) = delete;
   Exec& operator=(Exec const&) = delete;
-
 #endif
   static xbt::signal<void(Exec const&)> on_start;
   static xbt::signal<void(Exec const&)> on_completion;
index 832631d..a4423ba 100644 (file)
@@ -33,8 +33,6 @@ private:
 public:
 #ifndef DOXYGEN
   friend Disk;    // Factory of IOs
-
-  ~Io() override = default;
 #endif
 
   static xbt::signal<void(Io const&)> on_start;
index 77632c1..e932eb9 100644 (file)
@@ -88,7 +88,6 @@ public:
       : Type(event_type, name, alias, "", father){};
   ValueType(PajeEventType event_type, const std::string& name, Type* father)
       : Type(event_type, name, name, "", father){};
-  ~ValueType() override = default;
   void add_entity_value(const std::string& name, const std::string& color);
   void add_entity_value(const std::string& name);
   EntityValue* get_entity_value(const std::string& name);
index a6a7ea8..f80f4e7 100644 (file)
@@ -25,7 +25,6 @@ class XBT_PUBLIC ConditionVariableImpl {
 
 public:
   ConditionVariableImpl() : piface_(this){};
-  ~ConditionVariableImpl() = default;
 
   void remove_sleeping_actor(actor::ActorImpl& actor) { xbt::intrusive_erase(sleeping_, actor); }
   const s4u::ConditionVariable* get_iface() const { return &piface_; }
index f2d05b7..3be684e 100644 (file)
@@ -23,7 +23,6 @@ class XBT_PUBLIC SemaphoreImpl {
 
 public:
   explicit SemaphoreImpl(unsigned int value) : value_(value){};
-  ~SemaphoreImpl() = default;
 
   SemaphoreImpl(SemaphoreImpl const&) = delete;
   SemaphoreImpl& operator=(SemaphoreImpl const&) = delete;
index 5d0c309..9b78c6a 100644 (file)
@@ -24,7 +24,6 @@ public:
   int original_num = -1; // num field of the VisitedState to which I was declared equal to (used for dot_output)
 
   explicit VisitedState(unsigned long state_number);
-  ~VisitedState() = default;
 };
 
 class XBT_PRIVATE VisitedStates {
index cd73ea9..39f899f 100644 (file)
@@ -30,7 +30,6 @@ public:
   bool exploration_started = false;
 
   explicit Pair(unsigned long expanded_pairs);
-  ~Pair() = default;
 
   Pair(Pair const&) = delete;
   Pair& operator=(Pair const&) = delete;
@@ -48,13 +47,11 @@ public:
 
   VisitedPair(int pair_num, xbt_automaton_state_t automaton_state,
               std::shared_ptr<const std::vector<int>> atomic_propositions, std::shared_ptr<State> graph_state);
-  ~VisitedPair() = default;
 };
 
 class XBT_PRIVATE LivenessChecker : public Checker {
 public:
   explicit LivenessChecker();
-  ~LivenessChecker() override = default;
   void run() override;
   RecordTrace get_record_trace() override;
   std::vector<std::string> get_textual_trace() override;
index 0d08f13..a16070e 100644 (file)
@@ -24,7 +24,6 @@ class XBT_PRIVATE SafetyChecker : public Checker {
 
 public:
   explicit SafetyChecker();
-  ~SafetyChecker() override = default;
   void run() override;
   RecordTrace get_record_trace() override;
   std::vector<std::string> get_textual_trace() override;
index d6541c1..57dbe95 100644 (file)
@@ -16,7 +16,6 @@ namespace mc {
 class XBT_PRIVATE UdporChecker : public Checker {
 public:
   explicit UdporChecker();
-  ~UdporChecker() override = default;
   void run() override;
   RecordTrace get_record_trace() override;
   std::vector<std::string> get_textual_trace() override;
index 192a093..7c5fe19 100644 (file)
@@ -37,7 +37,6 @@ private:
 
 public:
   Region(RegionType type, void* start_addr, size_t size);
-  ~Region()             = default;
   Region(Region const&) = delete;
   Region& operator=(Region const&) = delete;
   Region(Region&& that)            = delete;
index 35865cd..fbcf185 100644 (file)
@@ -61,7 +61,6 @@ class XBT_PRIVATE Snapshot final : public AddressSpace {
 public:
   /* Initialization */
   Snapshot(int num_state, RemoteSimulation* get_remote_simulation = &mc_model_checker->get_remote_simulation());
-  ~Snapshot() override = default;
 
   /* Regular use */
   bool on_heap(const void* address) const
index e49fcf0..2c8b7a1 100644 (file)
@@ -54,7 +54,6 @@ public:
   Configuration(const Configuration&) = default;
   Configuration& operator=(Configuration const&) = default;
   Configuration(Configuration&&)                 = default;
-  ~Configuration()                               = default;
 };
 
 class UnfoldingEvent {
@@ -65,7 +64,6 @@ public:
   UnfoldingEvent(const UnfoldingEvent&) = default;
   UnfoldingEvent& operator=(UnfoldingEvent const&) = default;
   UnfoldingEvent(UnfoldingEvent&&)                 = default;
-  ~UnfoldingEvent()                                = default;
 
   EventSet getHistory() const;
 
index d87469c..25da958 100644 (file)
@@ -49,7 +49,6 @@ public:
 
   Task(const Task&) = delete;
   Task& operator=(const Task&) = delete;
-  ~Task()                      = default;
 
   bool is_used() const { return is_used_; }
   bool is_parallel() const { return parallel_; }
index fb6ca07..a4b5fcb 100644 (file)
@@ -38,7 +38,6 @@ public:
   double get_max_downtime() const { return max_downtime_; }
 
   static simgrid::xbt::Extension<VirtualMachineImpl, DirtyPageTrackingExt> EXTENSION_ID;
-  virtual ~DirtyPageTrackingExt() = default;
   DirtyPageTrackingExt()          = default;
 };
 
index a9a5836..477e8e2 100644 (file)
@@ -63,7 +63,6 @@ public:
       , current_flops_(host_->get_load())
   {
   }
-  ~HostLoad() = default;
   HostLoad() = delete;
   explicit HostLoad(simgrid::s4u::Host& ptr) = delete;
   explicit HostLoad(simgrid::s4u::Host&& ptr) = delete;
index efea153..e0a6006 100644 (file)
@@ -50,7 +50,6 @@ public:
   static simgrid::xbt::Extension<simgrid::s4u::Link, LinkEnergy> EXTENSION_ID;
 
   explicit LinkEnergy(simgrid::s4u::Link* ptr) : link_(ptr), last_updated_(surf_get_clock()) {}
-  ~LinkEnergy() = default;
 
   void init_watts_range_list();
   double get_consumed_energy();
index 2dc82a0..c2ff738 100644 (file)
@@ -35,8 +35,6 @@ public:
   static simgrid::xbt::Extension<simgrid::s4u::Link, LinkEnergyWifi> EXTENSION_ID;
 
   explicit LinkEnergyWifi(simgrid::s4u::Link* ptr) : link_(ptr) {}
-
-  ~LinkEnergyWifi() = default;
   LinkEnergyWifi()  = delete;
 
   /**
index 2794b47..edadcbc 100644 (file)
@@ -43,7 +43,6 @@ public:
   static simgrid::xbt::Extension<simgrid::s4u::Link, LinkLoad> EXTENSION_ID;
 
   explicit LinkLoad(simgrid::s4u::Link* ptr);
-  ~LinkLoad() = default;
 
   void track();
   void untrack();
index 29c13b5..ec89754 100644 (file)
@@ -14,7 +14,6 @@ namespace vm {
 class VmHostExt {
 public:
   static simgrid::xbt::Extension<simgrid::s4u::Host, VmHostExt> EXTENSION_ID;
-  virtual ~VmHostExt() = default;
 
   sg_size_t ramsize = 0;    /* available ramsize (0= not taken into account) */
   bool overcommit   = true; /* Whether the host allows overcommiting more VM than the avail ramsize allows */
index 269c185..d0893c0 100644 (file)
@@ -19,7 +19,6 @@ public:
   s4u::ActorPtr tx_     = nullptr;
   s4u::ActorPtr rx_     = nullptr;
   static simgrid::xbt::Extension<simgrid::s4u::Host, VmMigrationExt> EXTENSION_ID;
-  virtual ~VmMigrationExt() = default;
   explicit VmMigrationExt(s4u::ActorPtr issuer, s4u::ActorPtr rx, s4u::ActorPtr tx) : issuer_(issuer), tx_(tx), rx_(rx)
   {
   }
index 7d75aa2..f1ff837 100644 (file)
@@ -26,7 +26,6 @@ public:
   static xbt::Extension<s4u::Host, smpi::Host> EXTENSION_ID;
 
   explicit Host(s4u::Host* ptr);
-  ~Host() = default;
 
   double orecv(size_t size);
   double osend(size_t size);
index 91aeaee..df50447 100644 (file)
@@ -22,7 +22,6 @@ class Info : public F2C{
 public:
   explicit Info() {this->add_f();}
   explicit Info(const Info* orig) : map_(orig->map_) {this->add_f();}
-  ~Info() override = default;
   void ref();
   static void unref(MPI_Info info);
   void set(const char* key, const char* value) { map_[key] = value; }
index d1c912c..7ef6cec 100644 (file)
@@ -42,7 +42,6 @@ public:
 class CpuCas01 : public Cpu {
 public:
   CpuCas01(s4u::Host* host, const std::vector<double>& speed_per_pstate) : Cpu(host, speed_per_pstate) {}
-  ~CpuCas01()               = default;
   CpuCas01(const CpuCas01&) = delete;
   CpuCas01& operator=(const CpuCas01&) = delete;
   void apply_event(profile::Event* event, double value) override;
index 3460d36..7911375 100644 (file)
@@ -31,7 +31,6 @@ class XBT_PRIVATE NetworkSmpiModel;
 class NetworkCm02Model : public NetworkModel {
 public:
   NetworkCm02Model();
-  ~NetworkCm02Model() override = default;
   LinkImpl* create_link(const std::string& name, const std::vector<double>& bandwidths,
                         s4u::Link::SharingPolicy policy) override;
   void update_actions_state_lazy(double now, double delta) override;
@@ -46,7 +45,6 @@ public:
 class NetworkCm02Link : public LinkImpl {
 public:
   NetworkCm02Link(const std::string& name, double bandwidth, s4u::Link::SharingPolicy policy, lmm::System* system);
-  ~NetworkCm02Link() override = default;
   void apply_event(kernel::profile::Event* event, double value) override;
   void set_bandwidth(double value) override;
   LinkImpl* set_latency(double value) override;
@@ -60,7 +58,6 @@ class NetworkCm02Action : public NetworkAction {
 
 public:
   using NetworkAction::NetworkAction;
-  ~NetworkCm02Action() override = default;
   void update_remains_lazy(double now) override;
 };
 }
index e08b23a..007bc0c 100644 (file)
@@ -35,7 +35,6 @@ public:
   // number of comms the node is receiving
   int nbActiveCommsDown = 0;
   explicit IBNode(int id) : id(id){};
-  virtual ~IBNode() = default;
 };
 
 class XBT_PRIVATE NetworkIBModel : public NetworkSmpiModel {
index 38f60c1..00b44bc 100644 (file)
@@ -17,7 +17,6 @@ namespace resource {
 class NetworkNS3Model : public NetworkModel {
 public:
   NetworkNS3Model();
-  ~NetworkNS3Model() override = default;
   LinkImpl* create_link(const std::string& name, const std::vector<double>& bandwidth,
                         s4u::Link::SharingPolicy policy) override;
   Action* communicate(s4u::Host* src, s4u::Host* dst, double size, double rate) override;
index e51a440..b5fa658 100644 (file)
@@ -18,7 +18,6 @@ namespace resource {
 class XBT_PRIVATE NetworkSmpiModel : public NetworkCm02Model {
 public:
   NetworkSmpiModel();
-  ~NetworkSmpiModel() override = default;
 
   double get_latency_factor(double size) override;
   double get_bandwidth_factor(double size) override;
index 8d4aac4..a38cb2d 100644 (file)
@@ -78,7 +78,6 @@ public:
 class CpuL07 : public kernel::resource::Cpu {
 public:
   CpuL07(s4u::Host* host, const std::vector<double>& speed_per_pstate) : Cpu(host, speed_per_pstate){};
-  ~CpuL07()             = default;
   CpuL07(const CpuL07&) = delete;
   CpuL07& operator=(const CpuL07&) = delete;
 
index 67a8fad..f213bb1 100644 (file)
@@ -182,7 +182,6 @@ public:
   TypedConfigurationElement(const std::string& key, const std::string& desc, T value, std::function<void(T&)> callback)
       : ConfigurationElement(key, desc), content(std::move(value)), callback(std::move(callback))
   {}
-  ~TypedConfigurationElement() override = default;
 
   std::string get_string_value() override;
   const char* get_type_name() override;