Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Prefer using "try_emplace" (sonar, c++17).
[simgrid.git] / examples / cpp / replay-io / s4u-replay-io.cpp
index 96ee3f7..5b586fd 100644 (file)
@@ -63,7 +63,7 @@ public:
 
     ACT_DEBUG("Entering Open: %s (filename: %s)", NAME.c_str(), file_name.c_str());
     auto* file = sg4::File::open(file_name, nullptr);
-    opened_files.emplace(full_name, file);
+    opened_files.try_emplace(full_name, file);
 
     log_action(action, sg4::Engine::get_clock() - clock);
   }