Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Useless cosmetics while trying to understand that code
[simgrid.git] / src / mc / mc_record.cpp
index 895f1589dd44640011cf5f4edde508448700d41d..72483fe420851734cc0fb7ab91963002cbd6f400 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(simgrid::kernel::actor::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