-/* Copyright (c) 2004-2020. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2004-2022. 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/Event.hpp"
#include "src/kernel/resource/profile/Profile.hpp"
-namespace simgrid {
-namespace kernel {
-namespace profile {
+namespace simgrid::kernel::profile {
simgrid::kernel::profile::FutureEvtSet future_evt_set; // FIXME: singleton antipattern
/** @brief Retrieves the next occurring event, or nullptr if none happens before date */
Event* FutureEvtSet::pop_leq(double date, double* value, resource::Resource** resource)
{
- double event_date = next_date();
- if (event_date > date || heap_.empty())
+ if (next_date() > date || heap_.empty())
return nullptr;
Event* event = heap_.top().second;
return event;
}
-} // namespace profile
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::profile