Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Mark deprecated virtual methods "final", and complete ChangeLog.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sun, 27 Oct 2019 16:45:12 +0000 (17:45 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 28 Oct 2019 10:11:22 +0000 (11:11 +0100)
Redefining these methods in derived classes may lead to runtime
errors, as seen with simgrid-FMI.

ChangeLog
include/simgrid/kernel/resource/Model.hpp

index d665a77..fd81419 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,9 +2,16 @@
 
 SimGrid (3.24.1) NOT RELEASED YET (v3.25 expected December 22. 2029, 04:19 UTC)
 
 
 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
 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
 
 ----------------------------------------------------------------------------
  - FG!19: Removing RngStream
 
 ----------------------------------------------------------------------------
index 43d451d..ee23a15 100644 (file)
@@ -74,17 +74,17 @@ public:
   virtual double next_occurring_event_lazy(double now);
   virtual double next_occurring_event_full(double now);
 
   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(
   {
     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(
   {
     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);
   }
   {
     return next_occurring_event_full(now);
   }
@@ -114,7 +114,7 @@ public:
   virtual bool next_occurring_event_is_idempotent() { return true; }
 
   XBT_ATTRIB_DEPRECATED_v329(
   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();
   }
   {
     return next_occurring_event_is_idempotent();
   }