From 75101a48b15eceef19200f3f6381e6f89370d285 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Mon, 9 Mar 2020 09:53:11 +0100 Subject: [PATCH] More const. --- include/simgrid/exec.h | 2 +- src/s4u/s4u_Exec.cpp | 2 +- teshsuite/s4u/host-on-off-actors/host-on-off-actors.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/simgrid/exec.h b/include/simgrid/exec.h index 4dee58abb3..6740397020 100644 --- a/include/simgrid/exec.h +++ b/include/simgrid/exec.h @@ -13,7 +13,7 @@ SG_BEGIN_DECL XBT_PUBLIC void sg_exec_set_bound(sg_exec_t exec, double bound); -XBT_PUBLIC const char* sg_exec_get_name(sg_exec_t exec); +XBT_PUBLIC const char* sg_exec_get_name(const_sg_exec_t exec); XBT_PUBLIC void sg_exec_set_name(sg_exec_t exec, const char* name); XBT_PUBLIC void sg_exec_set_host(sg_exec_t exec, sg_host_t new_host); XBT_PUBLIC double sg_exec_get_remaining(const_sg_exec_t exec); diff --git a/src/s4u/s4u_Exec.cpp b/src/s4u/s4u_Exec.cpp index 86926f85aa..85874d27bc 100644 --- a/src/s4u/s4u_Exec.cpp +++ b/src/s4u/s4u_Exec.cpp @@ -217,7 +217,7 @@ void sg_exec_set_bound(sg_exec_t exec, double bound) exec->set_bound(bound); } -const char* sg_exec_get_name(sg_exec_t exec) +const char* sg_exec_get_name(const_sg_exec_t exec) { return exec->get_cname(); } diff --git a/teshsuite/s4u/host-on-off-actors/host-on-off-actors.cpp b/teshsuite/s4u/host-on-off-actors/host-on-off-actors.cpp index 07bc7850ff..a651ff4608 100644 --- a/teshsuite/s4u/host-on-off-actors/host-on-off-actors.cpp +++ b/teshsuite/s4u/host-on-off-actors/host-on-off-actors.cpp @@ -12,7 +12,7 @@ int tasks_done = 0; static void actor_daemon() { - simgrid::s4u::Host* host = simgrid::s4u::Host::current(); + const simgrid::s4u::Host* host = simgrid::s4u::Host::current(); XBT_INFO(" Start daemon on %s (%f)", host->get_cname(), host->get_speed()); for (;;) { XBT_INFO(" Execute daemon"); -- 2.20.1