From: Martin Quinson Date: Fri, 6 May 2016 16:23:37 +0000 (+0200) Subject: kill a useless accessor X-Git-Tag: v3_14~1266 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/38e2adf74c9fccec6487e953bcb6895b72786dc1 kill a useless accessor --- diff --git a/src/bindings/java/JavaContext.cpp b/src/bindings/java/JavaContext.cpp index f5f0ffcb24..54b394fdda 100644 --- a/src/bindings/java/JavaContext.cpp +++ b/src/bindings/java/JavaContext.cpp @@ -132,7 +132,7 @@ void JavaContext::stop() // jxbt_throw_by_name(env, "org/simgrid/msg/ProcessKilledError", bprintf("Process %s killed :) (file smx_context_java.c)", MSG_process_get_name( (msg_process_t)context) )); jxbt_throw_by_name(env, "org/simgrid/msg/ProcessKilledError", bprintf("Process %s killed :) (file JavaContext.cpp)", - simcall_process_get_name((smx_process_t) SIMIX_context_get_process(this))) ); + simcall_process_get_name(this->process()) )); XBT_DEBUG("Trigger a cancel error at the C level"); THROWF(cancel_error, 0, "process cancelled"); } else { diff --git a/src/simix/smx_private.hpp b/src/simix/smx_private.hpp index 71504cd3a1..591265e2bb 100644 --- a/src/simix/smx_private.hpp +++ b/src/simix/smx_private.hpp @@ -60,16 +60,6 @@ static inline smx_context_t SIMIX_context_self(void) return nullptr; } -/** - \brief returns the SIMIX process associated to a context - \param context The context - \return The SIMIX process - */ -static inline smx_process_t SIMIX_context_get_process(smx_context_t context) -{ - return context->process(); -} - namespace simgrid { namespace simix { diff --git a/src/simix/smx_process.cpp b/src/simix/smx_process.cpp index 17541e9e2f..02daca1a6d 100644 --- a/src/simix/smx_process.cpp +++ b/src/simix/smx_process.cpp @@ -38,7 +38,7 @@ smx_process_t SIMIX_process_self(void) { smx_context_t self_context = SIMIX_context_self(); - return self_context ? SIMIX_context_get_process(self_context) : NULL; + return self_context ? self_context->process() : NULL; } /**