Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Prefer using "try_emplace" (sonar, c++17).
[simgrid.git] / src / xbt / xbt_replay.cpp
index c64910a..41c6d57 100644 (file)
@@ -81,7 +81,7 @@ static ReplayAction* get_action(const char* name)
         otherqueue = act->second;
       } else { // Damn. Create the queue of that guy
         otherqueue = new std::queue<ReplayAction*>();
-        action_queues.insert({evtname, otherqueue});
+        action_queues.try_emplace(evtname, otherqueue);
       }
       otherqueue->push(action);
     }