From dadfefc9f3cc6cf0fc28a9025307f9f08dc4ac96 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Mon, 10 Oct 2016 15:24:07 +0200 Subject: [PATCH 1/1] API format unification --- examples/s4u/launching/s4u_launching.cpp | 2 +- include/simgrid/s4u/Mailbox.hpp | 2 +- src/msg/msg_gos.cpp | 2 +- src/s4u/s4u_mailbox.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/s4u/launching/s4u_launching.cpp b/examples/s4u/launching/s4u_launching.cpp index 6338f89863..49e2a4c65f 100644 --- a/examples/s4u/launching/s4u_launching.cpp +++ b/examples/s4u/launching/s4u_launching.cpp @@ -77,7 +77,7 @@ public: mailbox = simgrid::s4u::Mailbox::byName(args[1]); } void operator()() { - XBT_INFO("Hello s4u, I'm ready to get any message you'd want on %s", mailbox->getName()); + XBT_INFO("Hello s4u, I'm ready to get any message you'd want on %s", mailbox->name()); char *msg1 = static_cast(simgrid::s4u::this_actor::recv(mailbox)); char *msg2 = static_cast(simgrid::s4u::this_actor::recv(mailbox)); diff --git a/include/simgrid/s4u/Mailbox.hpp b/include/simgrid/s4u/Mailbox.hpp index 9236131360..07925b5228 100644 --- a/include/simgrid/s4u/Mailbox.hpp +++ b/include/simgrid/s4u/Mailbox.hpp @@ -121,7 +121,7 @@ public: smx_mailbox_t getImpl() { return pimpl_; } /** Gets the name of that mailbox */ - const char *getName(); + const char *name(); /** Retrieve the mailbox associated to the given C string */ static MailboxPtr byName(const char *name); diff --git a/src/msg/msg_gos.cpp b/src/msg/msg_gos.cpp index 295ba5f308..e9227f098d 100644 --- a/src/msg/msg_gos.cpp +++ b/src/msg/msg_gos.cpp @@ -268,7 +268,7 @@ msg_error_t MSG_task_receive_ext_bounded(msg_task_t * task, const char *alias, d /* Try to receive it by calling SIMIX network layer */ try { simcall_comm_recv(MSG_process_self(), mailbox->getImpl(), task, nullptr, nullptr, nullptr, nullptr, timeout, rate); - XBT_DEBUG("Got task %s from %s",(*task)->name,mailbox->getName()); + XBT_DEBUG("Got task %s from %s",(*task)->name,mailbox->name()); (*task)->simdata->setNotUsed(); } catch (xbt_ex& e) { diff --git a/src/s4u/s4u_mailbox.cpp b/src/s4u/s4u_mailbox.cpp index c23d735e4c..ea2a10893e 100644 --- a/src/s4u/s4u_mailbox.cpp +++ b/src/s4u/s4u_mailbox.cpp @@ -16,7 +16,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_channel,s4u,"S4U Communication Mailboxes"); namespace simgrid { namespace s4u { -const char *Mailbox::getName() { +const char *Mailbox::name() { return pimpl_->name; } -- 2.20.1