Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use std::fill instead of memset.
[simgrid.git] / src / xbt / config.cpp
index 0ae2bf8..64c5b99 100644 (file)
@@ -31,8 +31,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_cfg, xbt, "configuration support");
 
 XBT_EXPORT_NO_IMPORT xbt_cfg_t simgrid_config = nullptr;
 
-namespace simgrid {
-namespace config {
+namespace simgrid::config {
 
 namespace {
 
@@ -386,8 +385,7 @@ void set_parse(const std::string& opt)
     std::string val = name.substr(pos + 1);
     name.erase(pos);
 
-    const std::string path("path");
-    if (name.compare(0, path.length(), path) != 0)
+    if (name.rfind("path", 0) != 0)
       XBT_INFO("Configuration change: Set '%s' to '%s'", name.c_str(), val.c_str());
 
     set_as_string(name.c_str(), val);
@@ -449,8 +447,7 @@ void help()
 {
   simgrid_config->help();
 }
-}
-}
+} // namespace simgrid::config
 
 /*----[ Setting ]---------------------------------------------------------*/