From: Martin Quinson Date: Fri, 22 Jan 2016 15:59:32 +0000 (+0100) Subject: kill dead code in the C interface to surf X-Git-Tag: v3_13~1123 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/83ade874cb34c7f3afbc9f7a782e097cbb7209bf?ds=sidebyside kill dead code in the C interface to surf Every surf user should use the C++ interface anyway (+ useless cosmetics not worthing a commit on their own) --- diff --git a/src/include/surf/surf.h b/src/include/surf/surf.h index 275ac07d45..d46f2351c4 100644 --- a/src/include/surf/surf.h +++ b/src/include/surf/surf.h @@ -223,22 +223,6 @@ XBT_PUBLIC(surf_action_t) surf_model_extract_done_action_set(surf_model_t model) */ XBT_PUBLIC(surf_action_t) surf_model_extract_failed_action_set(surf_model_t model); -/** - * @brief Pop an action from the ready actions set - * - * @param model The model from which the action is extracted - * @return An action in ready state - */ -XBT_PUBLIC(surf_action_t) surf_model_extract_ready_action_set(surf_model_t model); - -/** - * @brief Pop an action from the running actions set - * - * @param model The model from which the action is extracted - * @return An action in running state - */ -XBT_PUBLIC(surf_action_t) surf_model_extract_running_action_set(surf_model_t model); - /** * @brief Get the size of the running action set of a model * diff --git a/src/surf/host_interface.hpp b/src/surf/host_interface.hpp index ce2c066a52..7766807dd9 100644 --- a/src/surf/host_interface.hpp +++ b/src/surf/host_interface.hpp @@ -47,10 +47,10 @@ namespace surf { * @brief SURF Host model interface class * @details A model is an object which handle the interactions between its Resources and its Actions */ -class HostModel : public Model{ +class HostModel : public Model { public: HostModel() : Model() {} - ~HostModel() {} + ~HostModel() override {} Host *createHost(const char *name, NetCard *net, Cpu *cpu, xbt_dict_t props); void addTraces() override {DIE_IMPOSSIBLE;} diff --git a/src/surf/surf_c_bindings.cpp b/src/surf/surf_c_bindings.cpp index e6270792fa..d9b620df52 100644 --- a/src/surf/surf_c_bindings.cpp +++ b/src/surf/surf_c_bindings.cpp @@ -185,22 +185,6 @@ surf_action_t surf_model_extract_failed_action_set(surf_model_t model){ return res; } -surf_action_t surf_model_extract_ready_action_set(surf_model_t model){ - if (model->getReadyActionSet()->empty()) - return NULL; - surf_action_t res = &model->getReadyActionSet()->front(); - model->getReadyActionSet()->pop_front(); - return res; -} - -surf_action_t surf_model_extract_running_action_set(surf_model_t model){ - if (model->getRunningActionSet()->empty()) - return NULL; - surf_action_t res = &model->getRunningActionSet()->front(); - model->getRunningActionSet()->pop_front(); - return res; -} - int surf_model_running_action_set_size(surf_model_t model){ return model->getRunningActionSet()->size(); }