Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add new entry in Release_Notes.
[simgrid.git] / src / xbt / config.cpp
index 08b403b..3cebd1e 100644 (file)
@@ -1,8 +1,17 @@
-/* Copyright (c) 2004-2022. The SimGrid Team. All rights reserved.     */
+/* Copyright (c) 2004-2023. The SimGrid Team. All rights reserved.     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
+#include "simgrid/Exception.hpp"
+#include "src/simgrid/sg_config.hpp"
+#include "xbt/dynar.h"
+#include "xbt/log.h"
+#include "xbt/misc.h"
+#include "xbt/sysdep.h"
+#include <xbt/config.h>
+#include <xbt/config.hpp>
+
 #include <cstdio>
 
 #include <algorithm>
 #include <string>
 #include <vector>
 
-#include "simgrid/Exception.hpp"
-#include "simgrid/sg_config.hpp"
-#include "xbt/dynar.h"
-#include "xbt/log.h"
-#include "xbt/misc.h"
-#include "xbt/sysdep.h"
-#include <xbt/config.h>
-#include <xbt/config.hpp>
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_cfg, xbt, "configuration support");
 
-XBT_EXPORT_NO_IMPORT xbt_cfg_t simgrid_config = nullptr;
+xbt_cfg_t simgrid_config = nullptr;
 
-namespace simgrid {
-namespace config {
+namespace simgrid::config {
 
 namespace {
 
@@ -102,10 +101,7 @@ public:
 template <> class ConfigType<std::string> {
 public:
   static constexpr const char* type_name = "string";
-  static inline std::string parse(const char* value)
-  {
-    return std::string(value);
-  }
+  static inline std::string parse(const char* value) { return value; }
 };
 template <> class ConfigType<bool> {
 public:
@@ -448,8 +444,7 @@ void help()
 {
   simgrid_config->help();
 }
-}
-}
+} // namespace simgrid::config
 
 /*----[ Setting ]---------------------------------------------------------*/