From 9184de69711560f747a3fbbb153a371375f2c38e Mon Sep 17 00:00:00 2001 From: Yann Duplouy Date: Fri, 12 Apr 2019 17:20:23 +0200 Subject: [PATCH] Comply with clang-format rules --- src/kernel/resource/profile/FutureEvtSet.cpp | 8 ++++---- src/kernel/resource/profile/Profile.cpp | 14 +++++++------- src/kernel/resource/profile/Profile.hpp | 6 +++--- src/kernel/resource/profile/trace_mgr.hpp | 2 -- 4 files changed, 14 insertions(+), 16 deletions(-) diff --git a/src/kernel/resource/profile/FutureEvtSet.cpp b/src/kernel/resource/profile/FutureEvtSet.cpp index 59b0bdc94c..3579fe889c 100644 --- a/src/kernel/resource/profile/FutureEvtSet.cpp +++ b/src/kernel/resource/profile/FutureEvtSet.cpp @@ -8,7 +8,7 @@ namespace simgrid { namespace kernel { namespace profile { - + FutureEvtSet::FutureEvtSet() = default; FutureEvtSet::~FutureEvtSet() { @@ -37,12 +37,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(); diff --git a/src/kernel/resource/profile/Profile.cpp b/src/kernel/resource/profile/Profile.cpp index 73f2962e88..a73c4c0e91 100644 --- a/src/kernel/resource/profile/Profile.cpp +++ b/src/kernel/resource/profile/Profile.cpp @@ -3,14 +3,14 @@ /* 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/Profile.hpp" +#include "simgrid/forward.h" +#include "src/kernel/resource/profile/DatedValue.cpp" +#include "src/kernel/resource/profile/FutureEvtSet.cpp" #include "xbt/log.h" #include "xbt/sysdep.h" -#include -#include "src/kernel/resource/profile/Profile.hpp" #include -#include "src/kernel/resource/profile/FutureEvtSet.cpp" -#include "src/kernel/resource/profile/DatedValue.cpp" -#include "simgrid/forward.h" +#include #include static std::unordered_map trace_list; @@ -25,7 +25,7 @@ Profile::Profile() DatedValue val(0, -1); event_list.push_back(val); } -Profile::~Profile() = default; +Profile::~Profile() = default; /** @brief Register this profile for that resource onto that FES, * and get an iterator over the integrated trace */ @@ -122,7 +122,7 @@ Profile* Profile::from_file(const std::string& path) return Profile::from_string(path, buffer.str(), -1); } - + } // namespace profile } // namespace kernel } // namespace simgrid diff --git a/src/kernel/resource/profile/Profile.hpp b/src/kernel/resource/profile/Profile.hpp index 305808a2b1..fdae8c5f9d 100644 --- a/src/kernel/resource/profile/Profile.hpp +++ b/src/kernel/resource/profile/Profile.hpp @@ -8,13 +8,13 @@ #include "src/kernel/resource/profile/DatedValue.hpp" #include "src/kernel/resource/profile/FutureEvtSet.hpp" -#include #include +#include namespace simgrid { namespace kernel { namespace profile { - + class Event { public: Profile* profile; @@ -22,7 +22,7 @@ public: resource::Resource* resource; bool free_me; }; - + /** @brief A profile is a set of timed values, encoding the value that a variable takes at what time * * It is useful to model dynamic platforms, where an external load that makes the resource availability change over diff --git a/src/kernel/resource/profile/trace_mgr.hpp b/src/kernel/resource/profile/trace_mgr.hpp index 9930b140e2..5ed634a3f0 100644 --- a/src/kernel/resource/profile/trace_mgr.hpp +++ b/src/kernel/resource/profile/trace_mgr.hpp @@ -25,6 +25,4 @@ extern XBT_PRIVATE simgrid::kernel::profile::FutureEvtSet future_evt_set; XBT_PUBLIC void tmgr_trace_event_unref(simgrid::kernel::profile::Event** trace_event); XBT_PUBLIC void tmgr_finalize(); - - #endif /* SURF_PMGR_H */ -- 2.20.1