Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Modernize method declarations.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 5 Oct 2020 21:05:56 +0000 (23:05 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 6 Oct 2020 09:24:00 +0000 (11:24 +0200)
Clang-tidy enabled checks:
    modernize-use-equals-default
    modernize-use-equals-delete
    modernize-use-override
    modernize-use-transparent-functors

41 files changed:
include/simgrid/Exception.hpp
include/simgrid/kernel/routing/WifiZone.hpp
include/simgrid/s4u/Comm.hpp
include/simgrid/s4u/Exec.hpp
include/simgrid/s4u/Io.hpp
include/simgrid/s4u/VirtualMachine.hpp
include/xbt/Extendable.hpp
include/xbt/functional.hpp
src/instr/instr_paje_events.hpp
src/instr/instr_paje_types.hpp
src/instr/instr_private.hpp
src/kernel/context/Context.hpp
src/kernel/context/ContextSwapped.hpp
src/kernel/resource/DiskImpl.hpp
src/kernel/resource/profile/FutureEvtSet.hpp
src/kernel/routing/DijkstraZone.cpp
src/mc/AddressSpace.hpp
src/mc/checker/CommunicationDeterminismChecker.hpp
src/mc/checker/LivenessChecker.hpp
src/mc/checker/SafetyChecker.hpp
src/mc/remote/RemoteSimulation.hpp
src/mc/sosp/Snapshot.hpp
src/plugins/vm/VirtualMachineImpl.hpp
src/smpi/include/smpi_datatype.hpp
src/smpi/include/smpi_datatype_derived.hpp
src/smpi/include/smpi_f2c.hpp
src/smpi/include/smpi_file.hpp
src/smpi/include/smpi_info.hpp
src/smpi/include/smpi_win.hpp
src/smpi/internals/smpi_replay.cpp
src/smpi/plugins/sampi_loadbalancer.cpp
src/surf/StorageImpl.hpp
src/surf/cpu_ti.hpp
src/surf/disk_s19.hpp
src/surf/network_cm02.hpp
src/surf/network_constant.hpp
src/surf/network_ns3.hpp
src/surf/network_smpi.hpp
src/surf/ptask_L07.hpp
src/surf/storage_n11.hpp
src/xbt/config.cpp

index 61d7469..7a3447c 100644 (file)
@@ -61,19 +61,19 @@ public:
 class XBT_PUBLIC ImpossibleError : public std::logic_error {
 public:
   explicit ImpossibleError(const std::string& arg) : std::logic_error(arg) {}
-  ~ImpossibleError();
+  ~ImpossibleError() override;
 };
 
 class XBT_PUBLIC InitializationError : public std::logic_error {
 public:
   explicit InitializationError(const std::string& arg) : std::logic_error(arg) {}
-  ~InitializationError();
+  ~InitializationError() override;
 };
 
 class XBT_PUBLIC UnimplementedError : public std::logic_error {
 public:
   explicit UnimplementedError(const std::string& arg) : std::logic_error(arg) {}
-  ~UnimplementedError();
+  ~UnimplementedError() override;
 };
 
 } // namespace xbt
@@ -87,7 +87,7 @@ public:
   }
   Exception(const Exception&)     = default;
   Exception(Exception&&) noexcept = default;
-  ~Exception(); // DO NOT define it here -- see Exception.cpp for a rationale
+  ~Exception() override; // DO NOT define it here -- see Exception.cpp for a rationale
 
   /** Return the information about where the exception was thrown */
   xbt::ThrowPoint const& throw_point() const { return throwpoint_; }
@@ -110,7 +110,7 @@ public:
   }
   TimeoutException(const TimeoutException&)     = default;
   TimeoutException(TimeoutException&&) noexcept = default;
-  ~TimeoutException();
+  ~TimeoutException() override;
 };
 
 XBT_ATTRIB_DEPRECATED_v328("Please use simgrid::TimeoutException") typedef TimeoutException TimeoutError;
@@ -124,7 +124,7 @@ public:
   }
   HostFailureException(const HostFailureException&)     = default;
   HostFailureException(HostFailureException&&) noexcept = default;
-  ~HostFailureException();
+  ~HostFailureException() override;
 };
 
 /** Exception raised when a communication fails because of the network or because of the remote host */
@@ -136,7 +136,7 @@ public:
   }
   NetworkFailureException(const NetworkFailureException&)     = default;
   NetworkFailureException(NetworkFailureException&&) noexcept = default;
-  ~NetworkFailureException();
+  ~NetworkFailureException() override;
 };
 
 /** Exception raised when a storage fails */
@@ -148,7 +148,7 @@ public:
   }
   StorageFailureException(const StorageFailureException&)     = default;
   StorageFailureException(StorageFailureException&&) noexcept = default;
-  ~StorageFailureException();
+  ~StorageFailureException() override;
 };
 
 /** Exception raised when a VM fails */
@@ -160,7 +160,7 @@ public:
   }
   VmFailureException(const VmFailureException&)     = default;
   VmFailureException(VmFailureException&&) noexcept = default;
-  ~VmFailureException();
+  ~VmFailureException() override;
 };
 
 /** Exception raised when something got canceled before completion */
@@ -172,7 +172,7 @@ public:
   }
   CancelException(const CancelException&)     = default;
   CancelException(CancelException&&) noexcept = default;
-  ~CancelException();
+  ~CancelException() override;
 };
 
 /** Exception raised when something is going wrong during the simulation tracing */
@@ -184,7 +184,7 @@ public:
   }
   TracingError(const TracingError&)     = default;
   TracingError(TracingError&&) noexcept = default;
-  ~TracingError();
+  ~TracingError() override;
 };
 
 /** Exception raised when something is going wrong during the parsing of XML files */
@@ -196,7 +196,7 @@ public:
   }
   ParseError(const ParseError&)     = default;
   ParseError(ParseError&&) noexcept = default;
-  ~ParseError();
+  ~ParseError() override;
 };
 
 class XBT_PUBLIC ForcefulKillException {
index 2227093..da6027d 100644 (file)
@@ -23,7 +23,7 @@ public:
   explicit WifiZone(NetZoneImpl* father, const std::string& name, resource::NetworkModel* netmodel);
   WifiZone(const WifiZone&) = delete;
   WifiZone& operator=(const WifiZone) = delete;
-  ~WifiZone()                         = default;
+  ~WifiZone() override                = default;
 
   void seal() override;
   void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
index 2e891c9..49b9071 100644 (file)
@@ -41,7 +41,7 @@ public:
   friend Mailbox; // Factory of comms
 #endif
 
-  virtual ~Comm();
+  ~Comm() override;
 
   static xbt::signal<void(Actor const&)> on_sender_start;
   static xbt::signal<void(Actor const&)> on_receiver_start;
index e3894ac..b15ed1b 100644 (file)
@@ -40,7 +40,7 @@ class XBT_PUBLIC Exec : public Activity_T<Exec> {
 
 public:
   Exec();
-  virtual ~Exec() = default;
+  ~Exec() override = default;
 #ifndef DOXYGEN
   Exec(Exec const&) = delete;
   Exec& operator=(Exec const&) = delete;
index 557eddf..e979fb5 100644 (file)
@@ -38,7 +38,7 @@ public:
   friend Storage; // Factory of IOs
 #endif
 
-  ~Io() = default;
+  ~Io() override = default;
 
   Io* start() override;
   Io* wait() override;
index e8a9f40..1ef5069 100644 (file)
@@ -22,7 +22,7 @@ namespace s4u {
  */
 class XBT_PUBLIC VirtualMachine : public s4u::Host {
   vm::VirtualMachineImpl* const pimpl_vm_;
-  virtual ~VirtualMachine();
+  ~VirtualMachine() override;
 
 public:
   explicit VirtualMachine(const std::string& name, Host* physical_host, int core_amount);
index 75eeeed..111181c 100644 (file)
@@ -24,7 +24,7 @@ class Extension {
   friend class Extendable<T>;
   explicit constexpr Extension(std::size_t id) : id_(id) {}
 public:
-  explicit constexpr Extension() {}
+  explicit constexpr Extension() = default;
   std::size_t id() const { return id_; }
   bool valid() const { return id_ != INVALID_ID; }
 };
@@ -69,7 +69,7 @@ public:
   {
     return Extension<T, U>(extension_create([](void* p) { delete static_cast<U*>(p); }));
   }
-  Extendable() {}
+  Extendable()                  = default;
   Extendable(const Extendable&) = delete;
   Extendable& operator=(const Extendable&) = delete;
   ~Extendable()
index b16e947..c09d278 100644 (file)
@@ -145,7 +145,7 @@ class Task<R(Args...)> {
   }
 
 public:
-  Task() { /* Nothing to do */}
+  Task() = default;
   explicit Task(std::nullptr_t) { /* Nothing to do */}
   ~Task()
   {
index f26a206..293a2cd 100644 (file)
@@ -80,7 +80,7 @@ class StateEvent : public PajeEvent {
 public:
   static xbt::signal<void(StateEvent&)> on_destruction;
   StateEvent(Container* container, Type* type, e_event_type event_type, EntityValue* value, TIData* extra);
-  ~StateEvent() { on_destruction(*this); }
+  ~StateEvent() override { on_destruction(*this); }
   bool has_extra() const { return extra_ != nullptr; }
   void print() override;
 };
index e23ddc2..b1f8bef 100644 (file)
@@ -85,7 +85,7 @@ public:
       : Type(event_type, name, alias, "", father){};
   ValueType(e_event_type event_type, const std::string& name, Type* father)
       : Type(event_type, name, name, "", father){};
-  virtual ~ValueType() = default;
+  ~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 f58bf9f..d85287f 100644 (file)
@@ -106,7 +106,7 @@ public:
       , send_type(send_type)
       , recv_type(recv_type){};
 
-  virtual ~TIData() {}
+  virtual ~TIData() = default;
 
   const std::string& get_name() const { return name_; }
   double get_amount() const { return amount_; }
index be67dd6..a26c635 100644 (file)
@@ -18,7 +18,7 @@ namespace context {
 
 class XBT_PUBLIC ContextFactory {
 public:
-  explicit ContextFactory() {}
+  explicit ContextFactory()             = default;
   ContextFactory(const ContextFactory&) = delete;
   ContextFactory& operator=(const ContextFactory&) = delete;
   virtual ~ContextFactory();
index 414416d..8d21c01 100644 (file)
@@ -50,7 +50,7 @@ public:
   SwappedContext(std::function<void()>&& code, actor::ActorImpl* get_actor, SwappedContextFactory* factory);
   SwappedContext(const SwappedContext&) = delete;
   SwappedContext& operator=(const SwappedContext&) = delete;
-  virtual ~SwappedContext();
+  ~SwappedContext() override;
 
   void suspend() override;
   virtual void resume();
index 11e4829..29841c2 100644 (file)
@@ -39,7 +39,7 @@ public:
   DiskModel();
   DiskModel(const DiskModel&) = delete;
   DiskModel& operator=(const DiskModel&) = delete;
-  ~DiskModel();
+  ~DiskModel() override;
 
   virtual DiskImpl* createDisk(const std::string& id, double read_bw, double write_bw) = 0;
 };
index 9137c32..96d0008 100644 (file)
@@ -27,7 +27,7 @@ public:
 
 private:
   typedef std::pair<double, Event*> Qelt;
-  std::priority_queue<Qelt, std::vector<Qelt>, std::greater<Qelt>> heap_;
+  std::priority_queue<Qelt, std::vector<Qelt>, std::greater<>> heap_;
 };
 
 // FIXME: kill that singleton
index 763a67f..2fa52db 100644 (file)
@@ -130,7 +130,7 @@ void DijkstraZone::get_local_route(NetPoint* src, NetPoint* dst, RouteCreationAr
     std::vector<double> cost_arr(nr_nodes); /* link cost from src to other hosts */
     pred_arr.resize(nr_nodes);              /* predecessors in path from src */
     typedef std::pair<double, int> Qelt;
-    std::priority_queue<Qelt, std::vector<Qelt>, std::greater<Qelt>> pqueue;
+    std::priority_queue<Qelt, std::vector<Qelt>, std::greater<>> pqueue;
 
     /* initialize */
     cost_arr[src_node_id] = 0.0;
index 27d7496..005adaa 100644 (file)
@@ -23,7 +23,7 @@ class ReadOptions {
   constexpr explicit ReadOptions(std::uint32_t value) : value_(value) {}
 
 public:
-  constexpr ReadOptions() {}
+  constexpr ReadOptions() = default;
 
   explicit constexpr operator bool() const { return value_ != 0; }
   constexpr bool operator!() const { return value_ == 0; }
index c692e2c..01daeee 100644 (file)
@@ -19,7 +19,7 @@ namespace mc {
 class XBT_PRIVATE CommunicationDeterminismChecker : public Checker {
 public:
   explicit CommunicationDeterminismChecker(Session& session);
-  ~CommunicationDeterminismChecker();
+  ~CommunicationDeterminismChecker() override;
   void run() override;
   RecordTrace get_record_trace() override;
   std::vector<std::string> get_textual_trace() override;
index d471da9..6b6f15e 100644 (file)
@@ -54,7 +54,7 @@ public:
 class XBT_PRIVATE LivenessChecker : public Checker {
 public:
   explicit LivenessChecker(Session& session);
-  ~LivenessChecker() = default;
+  ~LivenessChecker() override = default;
   void run() override;
   RecordTrace get_record_trace() override;
   std::vector<std::string> get_textual_trace() override;
index 0167dda..4233c36 100644 (file)
@@ -24,7 +24,7 @@ class XBT_PRIVATE SafetyChecker : public Checker {
 
 public:
   explicit SafetyChecker(Session& session);
-  ~SafetyChecker() = default;
+  ~SafetyChecker() override = default;
   void run() override;
   RecordTrace get_record_trace() override;
   std::vector<std::string> get_textual_trace() override;
index 3bd73c2..7c2c8f2 100644 (file)
@@ -74,7 +74,7 @@ private:
 
 public:
   explicit RemoteSimulation(pid_t pid);
-  ~RemoteSimulation();
+  ~RemoteSimulation() override;
   void init();
 
   RemoteSimulation(RemoteSimulation const&) = delete;
index ac6b434..c0531b5 100644 (file)
@@ -61,7 +61,7 @@ class XBT_PRIVATE Snapshot final : public AddressSpace {
 public:
   /* Initialization */
   Snapshot(int num_state, RemoteSimulation* get_remote_simulation = &mc_model_checker->get_remote_simulation());
-  ~Snapshot() = default;
+  ~Snapshot() override = default;
 
   /* Regular use */
   bool on_heap(const void* address) const
index a12b01f..b2597a5 100644 (file)
@@ -39,7 +39,7 @@ public:
   static std::deque<s4u::VirtualMachine*> allVms_;
 
   explicit VirtualMachineImpl(s4u::VirtualMachine* piface, s4u::Host* host, int core_amount, size_t ramsize);
-  ~VirtualMachineImpl();
+  ~VirtualMachineImpl() override;
 
   virtual void suspend(kernel::actor::ActorImpl* issuer);
   virtual void resume();
index bf01abb..f55d2a8 100644 (file)
@@ -113,7 +113,7 @@ public:
   Datatype(Datatype* datatype, int* ret);
   Datatype(const Datatype&) = delete;
   Datatype& operator=(const Datatype&) = delete;
-  virtual ~Datatype();
+  ~Datatype() override;
 
   char* name() const { return name_; }
   size_t size() const { return size_; }
index d749e2f..c1e94c8 100644 (file)
@@ -20,7 +20,7 @@ public:
   Type_Contiguous(int size, MPI_Aint lb, MPI_Aint ub, int flags, int block_count, MPI_Datatype old_type);
   Type_Contiguous(const Type_Contiguous&) = delete;
   Type_Contiguous& operator=(const Type_Contiguous&) = delete;
-  ~Type_Contiguous();
+  ~Type_Contiguous() override;
   int clone(MPI_Datatype* type) override;
   void serialize(const void* noncontiguous, void* contiguous, int count) override;
   void unserialize(const void* contiguous_vector, void* noncontiguous_vector, int count, MPI_Op op) override;
@@ -37,7 +37,7 @@ public:
                MPI_Datatype old_type);
   Type_Hvector(const Type_Hvector&) = delete;
   Type_Hvector& operator=(const Type_Hvector&) = delete;
-  ~Type_Hvector();
+  ~Type_Hvector() override;
   int clone(MPI_Datatype* type) override;
   void serialize(const void* noncontiguous, void* contiguous, int count) override;
   void unserialize(const void* contiguous_vector, void* noncontiguous_vector, int count, MPI_Op op) override;
@@ -64,7 +64,7 @@ public:
   Type_Hindexed(const Type_Hindexed&) = delete;
   Type_Hindexed& operator=(const Type_Hindexed&) = delete;
   int clone(MPI_Datatype* type) override;
-  ~Type_Hindexed();
+  ~Type_Hindexed() override;
   void serialize(const void* noncontiguous, void* contiguous, int count) override;
   void unserialize(const void* contiguous_vector, void* noncontiguous_vector, int count, MPI_Op op) override;
 };
@@ -88,7 +88,7 @@ public:
   Type_Struct(const Type_Struct&) = delete;
   Type_Struct& operator=(const Type_Struct&) = delete;
   int clone(MPI_Datatype* type) override;
-  ~Type_Struct();
+  ~Type_Struct() override;
   void serialize(const void* noncontiguous, void* contiguous, int count) override;
   void unserialize(const void* contiguous_vector, void* noncontiguous_vector, int count, MPI_Op op) override;
 };
index d0889f1..5b8a55d 100644 (file)
@@ -36,7 +36,7 @@ class F2C {
     static char* get_key(char* key, int id);
     static void delete_lookup();
     static std::unordered_map<std::string, F2C*>* lookup();
-    F2C() {}
+    F2C()          = default;
     virtual ~F2C() = default;
 
     //Override these to handle specific values.
index b1d5673..ad5e008 100644 (file)
@@ -36,7 +36,7 @@ class File : public F2C{
   File(MPI_Comm comm, const char *filename, int amode, MPI_Info info);
   File(const File&) = delete;
   File& operator=(const File&) = delete;
-  ~File();
+  ~File() override;
   int size() const;
   int get_position(MPI_Offset* offset) const;
   int get_position_shared(MPI_Offset* offset) const;
index 99664b5..8ff3be8 100644 (file)
@@ -22,7 +22,7 @@ class Info : public F2C{
 public:
   Info() = default;
   explicit Info(const Info* orig) : map_(orig->map_) {}
-  ~Info() = default;
+  ~Info() override = default;
   void ref();
   static void unref(MPI_Info info);
   void set(const char* key, const char* value) { map_[key] = value; }
index b50573c..cb84e72 100644 (file)
@@ -50,7 +50,7 @@ public:
   Win(MPI_Info info, MPI_Comm comm) : Win(MPI_BOTTOM, 0, 1, info, comm, 0, 1) {};
   Win(const Win&) = delete;
   Win& operator=(const Win&) = delete;
-  ~Win();
+  ~Win() override;
   int attach (void *base, MPI_Aint size);
   int detach (const void *base);
   void get_name(char* name, int* length) const;
index a74f941..f2cf41d 100644 (file)
@@ -89,25 +89,22 @@ private:
     req_storage_t store;
 
 public:
-    RequestStorage() {}
-    int size() const { return store.size(); }
+  RequestStorage() = default;
+  int size() const { return store.size(); }
 
-    req_storage_t& get_store()
-    {
-      return store;
-    }
+  req_storage_t& get_store() { return store; }
 
-    void get_requests(std::vector<MPI_Request>& vec) const
-    {
-      for (auto const& pair : store) {
-        auto& req = pair.second;
-        auto my_proc_id = simgrid::s4u::this_actor::get_pid();
-        if (req != MPI_REQUEST_NULL && (req->src() == my_proc_id || req->dst() == my_proc_id)) {
-          vec.push_back(pair.second);
-          pair.second->print_request("MM");
-        }
+  void get_requests(std::vector<MPI_Request>& vec) const
+  {
+    for (auto const& pair : store) {
+      auto& req       = pair.second;
+      auto my_proc_id = simgrid::s4u::this_actor::get_pid();
+      if (req != MPI_REQUEST_NULL && (req->src() == my_proc_id || req->dst() == my_proc_id)) {
+        vec.push_back(pair.second);
+        pair.second->print_request("MM");
       }
     }
+  }
 
     MPI_Request find(int src, int dst, int tag)
     {
index c989c3e..fcf27a3 100644 (file)
@@ -32,7 +32,7 @@ static simgrid::plugin::loadbalancer::LoadBalancer lb;
 class MigrateParser : public replay::ActionArgParser {
 public:
   double memory_consumption;
-  void parse(xbt::ReplayAction& action, const std::string&)
+  void parse(xbt::ReplayAction& action, const std::string&) override
   {
     // The only parameter is the amount of memory used by the current process.
     CHECK_ACTION_PARAMS(action, 1, 0);
@@ -46,7 +46,7 @@ public:
 class MigrateAction : public replay::ReplayAction<smpi::plugin::MigrateParser> {
 public:
   explicit MigrateAction() : ReplayAction("Migrate") {}
-  void kernel(xbt::ReplayAction&)
+  void kernel(xbt::ReplayAction&) override
   {
     static std::map<s4u::ActorPtr, int> migration_call_counter;
     static s4u::Barrier smpilb_bar(smpi_get_universe_size());
index ba17f01..72e3092 100644 (file)
@@ -46,7 +46,7 @@ public:
   StorageModel();
   StorageModel(const StorageModel&) = delete;
   StorageModel& operator=(const StorageModel&) = delete;
-  ~StorageModel();
+  ~StorageModel() override;
 
   virtual StorageImpl* createStorage(std::string& filename, int lineno, const std::string& id,
                                      const std::string& type_id, const std::string& content_name,
index 92a0527..ecb3575 100644 (file)
@@ -76,7 +76,7 @@ public:
   CpuTiAction(CpuTi* cpu, double cost);
   CpuTiAction(const CpuTiAction&) = delete;
   CpuTiAction& operator=(const CpuTiAction&) = delete;
-  ~CpuTiAction();
+  ~CpuTiAction() override;
 
   void set_state(Action::State state) override;
   void cancel() override;
index 5c99284..6bcdacb 100644 (file)
@@ -42,7 +42,7 @@ class DiskS19 : public DiskImpl {
 public:
   DiskS19(DiskModel* model, const std::string& name, kernel::lmm::System* maxminSystem, double read_bw,
           double write_bw);
-  virtual ~DiskS19() = default;
+  ~DiskS19() override = default;
   DiskAction* io_start(sg_size_t size, s4u::Io::OpType type) override;
   DiskAction* read(sg_size_t size) override;
   DiskAction* write(sg_size_t size) override;
index 4f90b1d..42354ab 100644 (file)
@@ -31,7 +31,7 @@ class XBT_PRIVATE NetworkSmpiModel;
 class NetworkCm02Model : public NetworkModel {
 public:
   explicit NetworkCm02Model(lmm::System* (*make_new_sys)(bool) = &lmm::make_new_maxmin_system);
-  virtual ~NetworkCm02Model() = default;
+  ~NetworkCm02Model() override = default;
   LinkImpl* create_link(const std::string& name, const std::vector<double>& bandwidths, double latency,
                         s4u::Link::SharingPolicy policy) override;
   void update_actions_state_lazy(double now, double delta) override;
@@ -62,7 +62,7 @@ class NetworkCm02Action : public NetworkAction {
 public:
   NetworkCm02Action(Model* model, s4u::Host& src, s4u::Host& dst, double cost, bool failed)
       : NetworkAction(model, src, dst, cost, failed){};
-  virtual ~NetworkCm02Action() = default;
+  ~NetworkCm02Action() override = default;
   void update_remains_lazy(double now) override;
 };
 }
index 282a7d2..2ae9d68 100644 (file)
@@ -28,7 +28,7 @@ public:
 class NetworkConstantAction : public NetworkAction {
 public:
   NetworkConstantAction(NetworkConstantModel* model_, s4u::Host& src, s4u::Host& dst, double size, double latency);
-  ~NetworkConstantAction();
+  ~NetworkConstantAction() override;
   double initial_latency_;
   void update_remains_lazy(double now) override;
 };
index abd978b..6e63595 100644 (file)
@@ -17,7 +17,7 @@ namespace resource {
 class NetworkNS3Model : public NetworkModel {
 public:
   NetworkNS3Model();
-  ~NetworkNS3Model() = default;
+  ~NetworkNS3Model() override = default;
   LinkImpl* create_link(const std::string& name, const std::vector<double>& bandwidth, double latency,
                         s4u::Link::SharingPolicy policy) override;
   Action* communicate(s4u::Host* src, s4u::Host* dst, double size, double rate) override;
@@ -33,7 +33,7 @@ class LinkNS3 : public LinkImpl {
 public:
   explicit LinkNS3(NetworkNS3Model* model, const std::string& name, double bandwidth, double latency,
                    s4u::Link::SharingPolicy policy);
-  ~LinkNS3();
+  ~LinkNS3() override;
   s4u::Link::SharingPolicy sharing_policy_;
 
   void apply_event(profile::Event* event, double value) override;
index 56d4d60..4906935 100644 (file)
@@ -18,11 +18,11 @@ namespace resource {
 class XBT_PRIVATE NetworkSmpiModel : public NetworkCm02Model {
 public:
   NetworkSmpiModel();
-  ~NetworkSmpiModel() = default;
+  ~NetworkSmpiModel() override = default;
 
-  double get_latency_factor(double size);
-  double get_bandwidth_factor(double size);
-  double get_bandwidth_constraint(double rate, double bound, double size);
+  double get_latency_factor(double size) override;
+  double get_bandwidth_factor(double size) override;
+  double get_bandwidth_constraint(double rate, double bound, double size) override;
 };
 } // namespace resource
 } // namespace kernel
index 4025bee..60cfda1 100644 (file)
@@ -51,7 +51,7 @@ public:
   CpuL07Model(HostL07Model* hmodel, kernel::lmm::System* sys);
   CpuL07Model(const CpuL07Model&) = delete;
   CpuL07Model& operator=(const CpuL07Model&) = delete;
-  ~CpuL07Model();
+  ~CpuL07Model() override;
 
   kernel::resource::Cpu* create_cpu(s4u::Host* host, const std::vector<double>& speed_per_pstate, int core) override;
   HostL07Model *hostModel_;
@@ -62,7 +62,7 @@ public:
   NetworkL07Model(HostL07Model* hmodel, kernel::lmm::System* sys);
   NetworkL07Model(const NetworkL07Model&) = delete;
   NetworkL07Model& operator=(const NetworkL07Model&) = delete;
-  ~NetworkL07Model();
+  ~NetworkL07Model() override;
   kernel::resource::LinkImpl* create_link(const std::string& name, const std::vector<double>& bandwidths,
                                           double latency, s4u::Link::SharingPolicy policy) override;
 
@@ -133,7 +133,7 @@ public:
             const double* bytes_amount, double rate);
   L07Action(const L07Action&) = delete;
   L07Action& operator=(const L07Action&) = delete;
-  ~L07Action();
+  ~L07Action() override;
 
   void updateBound();
   double get_latency() const { return latency_; }
index 3fcd75c..17e4a8e 100644 (file)
@@ -44,7 +44,7 @@ public:
   StorageN11(StorageModel* model, const std::string& name, kernel::lmm::System* maxminSystem, double bread,
              double bwrite, const std::string& type_id, const std::string& content_name, sg_size_t size,
              const std::string& attach);
-  virtual ~StorageN11() = default;
+  ~StorageN11() override = default;
   StorageAction* io_start(sg_size_t size, s4u::Io::OpType type) override;
   StorageAction* read(sg_size_t size) override;
   StorageAction* write(sg_size_t size) override;
index ef9fcf6..c698602 100644 (file)
@@ -189,7 +189,7 @@ 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() = default;
+  ~TypedConfigurationElement() override = default;
 
   std::string get_string_value() override;
   const char* get_type_name() override;