Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill a parameter that is always true
[simgrid.git] / src / mc / mc_record.cpp
index 5d65db9..72483fe 100644 (file)
@@ -18,8 +18,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_record, mc, "Logging specific to MC record/replay facility");
 
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
 
 void RecordTrace::replay() const
 {
@@ -43,7 +42,7 @@ void RecordTrace::replay() const
 
 void simgrid::mc::RecordTrace::replay(const std::string& path_string)
 {
-  simgrid::mc::processes_time.resize(kernel::actor::ActorIDTrait::get_maxpid());
+  simgrid::mc::processes_time.resize(kernel::actor::ActorImpl::get_maxpid());
   simgrid::mc::RecordTrace trace(path_string.c_str());
   trace.replay();
   for (auto* item : trace.transitions_)
@@ -61,9 +60,8 @@ simgrid::mc::RecordTrace::RecordTrace(const char* data)
   while (*current) {
     long aid;
     int times_considered;
-    int count = sscanf(current, "%ld/%d", &aid, &times_considered);
 
-    if(count != 2 && count != 1)
+    if (int count = sscanf(current, "%ld/%d", &aid, &times_considered); count != 2 && count != 1)
       throw std::invalid_argument("Could not parse record path");
     push_back(new simgrid::mc::Transition(simgrid::mc::Transition::Type::UNKNOWN, aid, times_considered));
 
@@ -93,5 +91,4 @@ std::string simgrid::mc::RecordTrace::to_string() const
 
 #endif
 
-}
-}
+} // namespace simgrid::mc