From d96d4efee79291d1cef76c1c230e5dad1a138fb9 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Thu, 5 Apr 2018 07:27:26 +0200 Subject: [PATCH] empty a C->C++ wrapper that will soon die --- src/xbt/config.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/xbt/config.cpp b/src/xbt/config.cpp index 16c47dc636..9e896f35eb 100644 --- a/src/xbt/config.cpp +++ b/src/xbt/config.cpp @@ -263,7 +263,7 @@ private: bool warn_for_aliases = true; public: - Config() = default; + Config(); ~Config(); // No copy: @@ -297,6 +297,10 @@ protected: ConfigurationElement* getDictElement(const char* name); }; +Config::Config() +{ + atexit(&sg_config_finalize); +} Config::~Config() { XBT_DEBUG("Frees cfg set %p", this); @@ -420,7 +424,6 @@ template XBT_PUBLIC void declareFlag(const char* name, const char* description, xbt_cfg_t xbt_cfg_new() { - atexit(&sg_config_finalize); return new simgrid::config::Config(); } void xbt_cfg_free(xbt_cfg_t * cfg) { delete *cfg; } -- 2.20.1