From: Arnaud Giersch Date: Sun, 22 Dec 2019 16:27:30 +0000 (+0100) Subject: Kill dead code. X-Git-Tag: v3.25~242 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/605cea7121c54b61a5333e659a3a1bbfa17c3c59 Kill dead code. --- diff --git a/include/xbt/config.h b/include/xbt/config.h index 517909cb6e..72606e996b 100644 --- a/include/xbt/config.h +++ b/include/xbt/config.h @@ -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); /* @} */ -/** @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 * diff --git a/src/xbt/config.cpp b/src/xbt/config.cpp index 60d5f21fa0..758650c2d3 100644 --- a/src/xbt/config.cpp +++ b/src/xbt/config.cpp @@ -141,14 +141,7 @@ private: 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, xbt_cfg_cb_t cb) - : key(key), desc(desc), old_callback(cb) - { - } 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, 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 callback) : ConfigurationElement(key, desc), content(std::move(value)), callback(std::move(callback)) {} @@ -202,8 +192,6 @@ public: void update() { - if (old_callback) - this->old_callback(get_key().c_str()); if (this->callback) this->callback(this->content); }