Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill dead code.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sun, 22 Dec 2019 16:27:30 +0000 (17:27 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sun, 22 Dec 2019 16:27:30 +0000 (17:27 +0100)
include/xbt/config.h
src/xbt/config.cpp

index 517909c..72606e9 100644 (file)
@@ -70,17 +70,6 @@ XBT_PUBLIC void sg_cfg_set_boolean(const char* name, const char* val);
 XBT_PUBLIC void sg_cfg_set_string(const char* name, const char* val);
 /* @} */
 
 XBT_PUBLIC void sg_cfg_set_string(const char* name, const char* val);
 /* @} */
 
-/** @defgroup XBT_cfg_decl Configuration type declaration and memory management
- *  @ingroup XBT_config
- *
- *  @{
- */
-
-/** @brief Callback types. They get the name of the modified entry, and the position of the changed value */
-typedef void (*xbt_cfg_cb_t)(const char* name);
-
-/** @} */
-
 /** @defgroup XBT_cfg_get Getting the stored values
  *  @ingroup XBT_config
  *
 /** @defgroup XBT_cfg_get Getting the stored values
  *  @ingroup XBT_config
  *
index 60d5f21..758650c 100644 (file)
@@ -141,14 +141,7 @@ private:
   bool isdefault = true;
 
 public:
   bool isdefault = true;
 
 public:
-  /* Callback */
-  xbt_cfg_cb_t old_callback = nullptr;
-
   ConfigurationElement(const std::string& key, const std::string& desc) : key(key), desc(desc) {}
   ConfigurationElement(const std::string& key, const std::string& desc) : key(key), desc(desc) {}
-  ConfigurationElement(const std::string& key, const std::string& desc, xbt_cfg_cb_t cb)
-      : key(key), desc(desc), old_callback(cb)
-  {
-  }
 
   virtual ~ConfigurationElement() = default;
 
 
   virtual ~ConfigurationElement() = default;
 
@@ -188,9 +181,6 @@ public:
   TypedConfigurationElement(const std::string& key, const std::string& desc, T value = T())
       : ConfigurationElement(key, desc), content(std::move(value))
   {}
   TypedConfigurationElement(const std::string& key, const std::string& desc, T value = T())
       : ConfigurationElement(key, desc), content(std::move(value))
   {}
-  TypedConfigurationElement(const std::string& key, const std::string& desc, T value, xbt_cfg_cb_t cb)
-      : ConfigurationElement(key, desc, cb), content(std::move(value))
-  {}
   TypedConfigurationElement(const std::string& key, const std::string& desc, T value, std::function<void(T&)> callback)
       : ConfigurationElement(key, desc), content(std::move(value)), callback(std::move(callback))
   {}
   TypedConfigurationElement(const std::string& key, const std::string& desc, T value, std::function<void(T&)> callback)
       : ConfigurationElement(key, desc), content(std::move(value)), callback(std::move(callback))
   {}
@@ -202,8 +192,6 @@ public:
 
   void update()
   {
 
   void update()
   {
-    if (old_callback)
-      this->old_callback(get_key().c_str());
     if (this->callback)
       this->callback(this->content);
   }
     if (this->callback)
       this->callback(this->content);
   }