From acdaba1e5294a4b167a54acb3d7cc4dca60e911c Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Sun, 27 Oct 2019 17:45:12 +0100 Subject: [PATCH] Mark deprecated virtual methods "final", and complete ChangeLog. Redefining these methods in derived classes may lead to runtime errors, as seen with simgrid-FMI. --- ChangeLog | 9 ++++++++- include/simgrid/kernel/resource/Model.hpp | 8 ++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index d665a77279..fd8141987d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,9 +2,16 @@ SimGrid (3.24.1) NOT RELEASED YET (v3.25 expected December 22. 2029, 04:19 UTC) +Kernel: +- In simgrid::kernel::resource::Model, the methods next_occuring_event*() have + been renamed to fix a spelling error. As usual, the previous definitions are + kept with a deprecation warning. However, to avoid runtime errors, it is now + forbidden to override these deprecated methods in a derived class. Please use + the new names immediately if you need to override them. + Fixed bugs (FG#.. -> framagit bugs; FG!.. -> framagit merge requests): - GH#31: [MC] please provide an option to make MPI_Send asynchronous - - GH#305: Unscheduled tasks are still excuted + - GH#305: Unscheduled tasks are still excuted - FG!19: Removing RngStream ---------------------------------------------------------------------------- diff --git a/include/simgrid/kernel/resource/Model.hpp b/include/simgrid/kernel/resource/Model.hpp index 43d451ddc5..ee23a153de 100644 --- a/include/simgrid/kernel/resource/Model.hpp +++ b/include/simgrid/kernel/resource/Model.hpp @@ -74,17 +74,17 @@ public: virtual double next_occurring_event_lazy(double now); virtual double next_occurring_event_full(double now); - XBT_ATTRIB_DEPRECATED_v329("Please use next_occurring_event()") virtual double next_occuring_event(double now) + XBT_ATTRIB_DEPRECATED_v329("Please use next_occurring_event()") virtual double next_occuring_event(double now) final { return next_occurring_event(now); } XBT_ATTRIB_DEPRECATED_v329("Please use next_occurring_event_lazy()") virtual double next_occuring_event_lazy( - double now) + double now) final { return next_occurring_event_lazy(now); } XBT_ATTRIB_DEPRECATED_v329("Please use next_occurring_event_full()") virtual double next_occuring_event_full( - double now) + double now) final { return next_occurring_event_full(now); } @@ -114,7 +114,7 @@ public: virtual bool next_occurring_event_is_idempotent() { return true; } XBT_ATTRIB_DEPRECATED_v329( - "Please use next_occurring_event_is_idempotent()") virtual bool next_occuring_event_is_idempotent() + "Please use next_occurring_event_is_idempotent()") virtual bool next_occuring_event_is_idempotent() final { return next_occurring_event_is_idempotent(); } -- 2.20.1