From e99bc6c90e14280bb468f87eae1b8bd28bff466e Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Sat, 14 Oct 2017 22:14:55 +0200 Subject: [PATCH] Cosmetics. --- include/simgrid/s4u/Host.hpp | 2 ++ src/surf/plugins/host_energy.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/simgrid/s4u/Host.hpp b/include/simgrid/s4u/Host.hpp index 09c55ec295..6495cf54b0 100644 --- a/include/simgrid/s4u/Host.hpp +++ b/include/simgrid/s4u/Host.hpp @@ -66,7 +66,9 @@ public: /** Retrieves the host on which the current actor is running */ static s4u::Host* current(); + /** Retrieves the name of that host as a C++ string */ simgrid::xbt::string const& getName() const { return name_; } + /** Retrieves the name of that host as a C string */ const char* getCname() const { return name_.c_str(); } void actorList(std::vector * whereto); diff --git a/src/surf/plugins/host_energy.cpp b/src/surf/plugins/host_energy.cpp index 1ff949dc58..380a8713f1 100644 --- a/src/surf/plugins/host_energy.cpp +++ b/src/surf/plugins/host_energy.cpp @@ -200,7 +200,7 @@ void HostEnergy::update() double energy_this_step = instantaneous_consumption * (finish_time - start_time); - // TODO Trace: Trace energy_this_step from start_time to finish_time in host->name() + // TODO Trace: Trace energy_this_step from start_time to finish_time in host->getName() this->total_energy = previous_energy + energy_this_step; this->last_updated = finish_time; @@ -363,7 +363,7 @@ static void onCreation(simgrid::s4u::Host& host) if (dynamic_cast(&host)) // Ignore virtual machines return; - //TODO Trace: set to zero the energy variable associated to host->name() + // TODO Trace: set to zero the energy variable associated to host->getName() host.extension_set(new HostEnergy(&host)); } -- 2.20.1