Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines with new year.
[simgrid.git] / src / kernel / resource / profile / FutureEvtSet.cpp
index 59b0bdc..f12265b 100644 (file)
@@ -1,14 +1,18 @@
-/* Copyright (c) 2004-2019. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2004-2020. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "src/kernel/resource/profile/FutureEvtSet.hpp"
+#include "src/kernel/resource/profile/Event.hpp"
+#include "src/kernel/resource/profile/Profile.hpp"
 
 namespace simgrid {
 namespace kernel {
 namespace profile {
-       
+
+simgrid::kernel::profile::FutureEvtSet future_evt_set; // FIXME: singleton antipattern
+
 FutureEvtSet::FutureEvtSet() = default;
 FutureEvtSet::~FutureEvtSet()
 {
@@ -37,12 +41,12 @@ Event* FutureEvtSet::pop_leq(double date, double* value, resource::Resource** re
   if (event_date > date || heap_.empty())
     return nullptr;
 
-  Event* event = heap_.top().second;
-  Profile* profile = event->profile;
+  Event* event       = heap_.top().second;
+  Profile* profile   = event->profile;
   DatedValue dateVal = profile->next(event);
 
   *resource = event->resource;
-  *value = dateVal.value_;
+  *value    = dateVal.value_;
 
   heap_.pop();
 
@@ -50,4 +54,4 @@ Event* FutureEvtSet::pop_leq(double date, double* value, resource::Resource** re
 }
 } // namespace profile
 } // namespace kernel
-} // namespace simgrid
\ No newline at end of file
+} // namespace simgrid