Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use std::fill instead of memset.
[simgrid.git] / src / instr / instr_paje_containers.cpp
index 3d680b2..f53a608 100644 (file)
@@ -10,8 +10,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_paje_containers, instr, "Paje tracing event system (containers)");
 
-namespace simgrid {
-namespace instr {
+namespace simgrid::instr {
 
 Container* Container::root_container_ = nullptr;              /* the root container */
 std::map<std::string, Container*, std::less<>> Container::all_containers_; /* all created containers indexed by name */
@@ -74,8 +73,8 @@ Container::~Container()
 {
   XBT_DEBUG("destroy container %s", get_cname());
   // Begin with destroying my own children
-  for (auto child : children_)
-    delete child.second;
+  for (auto const& [_, child] : children_)
+    delete child;
 
   // remove me from the all_containers_ data structure
   all_containers_.erase(name_);
@@ -136,5 +135,4 @@ EntityValue::EntityValue(const std::string& name, const std::string& color, Type
   on_creation(*this);
 }
 
-} // namespace instr
-} // namespace simgrid
+} // namespace simgrid::instr