Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill a useless accessor
authorMartin Quinson <martin.quinson@loria.fr>
Fri, 6 May 2016 16:23:37 +0000 (18:23 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Fri, 6 May 2016 16:23:37 +0000 (18:23 +0200)
src/bindings/java/JavaContext.cpp
src/simix/smx_private.hpp
src/simix/smx_process.cpp

index f5f0ffc..54b394f 100644 (file)
@@ -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 {
index 71504cd..591265e 100644 (file)
@@ -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 {
 
index 17541e9..02daca1 100644 (file)
@@ -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;
 }
 
 /**