From f712ddf7dc395df22b36f533ac35cf63e83b01a9 Mon Sep 17 00:00:00 2001 From: Frederic Suter Date: Thu, 4 Feb 2021 17:28:55 +0100 Subject: [PATCH] please clang and explicitly override --- include/simgrid/s4u/Activity.hpp | 2 +- include/simgrid/s4u/Comm.hpp | 2 +- include/simgrid/s4u/Exec.hpp | 2 +- include/simgrid/s4u/Io.hpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/simgrid/s4u/Activity.hpp b/include/simgrid/s4u/Activity.hpp index 6e894f60f8..22fa0a7649 100644 --- a/include/simgrid/s4u/Activity.hpp +++ b/include/simgrid/s4u/Activity.hpp @@ -33,7 +33,7 @@ protected: Activity() = default; virtual ~Activity() = default; - virtual bool is_assigned() = 0; + virtual bool is_assigned() const = 0; void release_dependencies() { diff --git a/include/simgrid/s4u/Comm.hpp b/include/simgrid/s4u/Comm.hpp index b202540429..0f27f0acb0 100644 --- a/include/simgrid/s4u/Comm.hpp +++ b/include/simgrid/s4u/Comm.hpp @@ -133,7 +133,7 @@ public: Actor* get_sender() const; - bool is_assigned() { return (to_ != nullptr && from_ != nullptr) || (mailbox_ != nullptr); } + bool is_assigned() const override { return (to_ != nullptr && from_ != nullptr) || (mailbox_ != nullptr); } }; } // namespace s4u } // namespace simgrid diff --git a/include/simgrid/s4u/Exec.hpp b/include/simgrid/s4u/Exec.hpp index f9a4007f41..6cb7870cbb 100644 --- a/include/simgrid/s4u/Exec.hpp +++ b/include/simgrid/s4u/Exec.hpp @@ -81,7 +81,7 @@ public: double get_finish_time() const; double get_cost() const; bool is_parallel() const { return parallel_; } - bool is_assigned() { return not hosts_.empty(); } + bool is_assigned() const override { return not hosts_.empty(); } }; } // namespace s4u diff --git a/include/simgrid/s4u/Io.hpp b/include/simgrid/s4u/Io.hpp index 0191c7aa0f..832631d656 100644 --- a/include/simgrid/s4u/Io.hpp +++ b/include/simgrid/s4u/Io.hpp @@ -52,7 +52,7 @@ public: IoPtr set_size(sg_size_t size); IoPtr set_op_type(OpType type); - bool is_assigned() { return disk_ != nullptr; } + bool is_assigned() const override { return disk_ != nullptr; } }; } // namespace s4u -- 2.20.1