Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill an almost unused function: surf_model_name
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 31 Oct 2015 23:39:14 +0000 (00:39 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 31 Oct 2015 23:39:14 +0000 (00:39 +0100)
src/include/surf/surf.h
src/surf/surf_c_bindings.cpp
teshsuite/surf/surf_usage/surf_usage2.c

index 2d9b4fb..43900a4 100644 (file)
@@ -192,12 +192,6 @@ XBT_PUBLIC(void) surf_as_cluster_set_backbone(AS_t as, void* backbone);
 
 /** @{ @ingroup SURF_c_bindings */
 
 
 /** @{ @ingroup SURF_c_bindings */
 
-/** @brief Get the name of a surf model (dont rely on exact value)
- *
- * This is implemented using typeid(), so it may change with the compiler
- */
-XBT_PUBLIC(const char *) surf_model_name(surf_model_t model);
-
 /**
  * @brief Pop an action from the done actions set
  *
 /**
  * @brief Pop an action from the done actions set
  *
index 032280e..9a60785 100644 (file)
@@ -185,10 +185,6 @@ void surf_as_cluster_set_backbone(AS_t as, void* backbone){
   static_cast<AsCluster*>(as)->p_backbone = static_cast<Link*>(backbone);
 }
 
   static_cast<AsCluster*>(as)->p_backbone = static_cast<Link*>(backbone);
 }
 
-const char *surf_model_name(surf_model_t model){
-  return typeid(model).name();
-}
-
 surf_action_t surf_model_extract_done_action_set(surf_model_t model){
   if (model->getDoneActionSet()->empty())
        return NULL;
 surf_action_t surf_model_extract_done_action_set(surf_model_t model){
   if (model->getDoneActionSet()->empty())
        return NULL;
index 242f9df..811b692 100644 (file)
@@ -73,7 +73,7 @@ void test(char *platform)
     XBT_DEBUG("Next Event : %g", now);
 
     xbt_dynar_foreach(model_list, iter, model) {
     XBT_DEBUG("Next Event : %g", now);
 
     xbt_dynar_foreach(model_list, iter, model) {
-      XBT_DEBUG("\t %s actions", surf_model_name(model));
+      XBT_DEBUG("\t Actions");
       while ((action = surf_model_extract_failed_action_set((surf_model_t)model))) {
         XBT_DEBUG("\t * Failed : %p", action);
         surf_action_unref(action);
       while ((action = surf_model_extract_failed_action_set((surf_model_t)model))) {
         XBT_DEBUG("\t * Failed : %p", action);
         surf_action_unref(action);
@@ -83,7 +83,7 @@ void test(char *platform)
         surf_action_unref(action);
       }
       if (surf_model_running_action_set_size((surf_model_t)model)) {
         surf_action_unref(action);
       }
       if (surf_model_running_action_set_size((surf_model_t)model)) {
-        XBT_DEBUG("running %s", surf_model_name(model));
+        XBT_DEBUG("running that model");
         running = 1;
       }
     }
         running = 1;
       }
     }