From b674d1f5e7a90a78efa74457b456d6fff2c9de56 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Thu, 17 Nov 2016 10:38:30 +0100 Subject: [PATCH] inline a stupid function --- src/surf/surf_c_bindings.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/surf/surf_c_bindings.cpp b/src/surf/surf_c_bindings.cpp index 7ddcf93e63..f6d294473a 100644 --- a/src/surf/surf_c_bindings.cpp +++ b/src/surf/surf_c_bindings.cpp @@ -17,11 +17,6 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_kernel); * TOOLS * *********/ -static simgrid::surf::VirtualMachineImpl* get_casted_vm(sg_host_t host) -{ - return static_cast(host)->pimpl_vm_; -} - extern double NOW; void surf_presolve() @@ -219,31 +214,31 @@ int surf_host_file_move(sg_host_t host, surf_file_t fd, const char* fullpath){ } void surf_vm_suspend(sg_host_t vm){ - get_casted_vm(vm)->suspend(); + static_cast(vm)->pimpl_vm_->suspend(); } void surf_vm_resume(sg_host_t vm){ - get_casted_vm(vm)->resume(); + static_cast(vm)->pimpl_vm_->resume(); } void surf_vm_save(sg_host_t vm){ - get_casted_vm(vm)->save(); + static_cast(vm)->pimpl_vm_->save(); } void surf_vm_restore(sg_host_t vm){ - get_casted_vm(vm)->restore(); + static_cast(vm)->pimpl_vm_->restore(); } void surf_vm_migrate(sg_host_t vm, sg_host_t ind_vm_ws_dest){ - get_casted_vm(vm)->migrate(ind_vm_ws_dest); + static_cast(vm)->pimpl_vm_->migrate(ind_vm_ws_dest); } sg_host_t surf_vm_get_pm(sg_host_t vm){ - return get_casted_vm(vm)->getPm(); + return static_cast(vm)->pimpl_vm_->getPm(); } void surf_vm_set_bound(sg_host_t vm, double bound){ - get_casted_vm(vm)->setBound(bound); + static_cast(vm)->pimpl_vm_->setBound(bound); } xbt_dict_t surf_storage_get_content(surf_resource_t resource){ -- 2.20.1