Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Simplify member initialization.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 23 Mar 2023 11:10:25 +0000 (12:10 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 24 Mar 2023 13:31:58 +0000 (14:31 +0100)
src/mc/api/RemoteApp.cpp
src/mc/api/RemoteApp.hpp

index 00c6522..beba474 100644 (file)
@@ -29,11 +29,8 @@ XBT_LOG_EXTERNAL_CATEGORY(mc_global);
 
 namespace simgrid::mc {
 
-RemoteApp::RemoteApp(const std::vector<char*>& args, bool need_memory_introspection)
+RemoteApp::RemoteApp(const std::vector<char*>& args, bool need_memory_introspection) : app_args_(args)
 {
-  for (auto* arg : args)
-    app_args_.push_back(arg);
-
   checker_side_ = std::make_unique<simgrid::mc::CheckerSide>(app_args_, need_memory_introspection);
 
   if (need_memory_introspection)
index 0c9c00d..285d0d4 100644 (file)
@@ -30,7 +30,7 @@ private:
   PageStore page_store_{500};
   std::shared_ptr<simgrid::mc::Snapshot> initial_snapshot_;
 
-  std::vector<char*> app_args_;
+  const std::vector<char*> app_args_;
 
   // No copy:
   RemoteApp(RemoteApp const&) = delete;