Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Declare local variables inside the if statement.
[simgrid.git] / src / instr / instr_paje_header.cpp
index 6cd678e..055c409 100644 (file)
@@ -1,10 +1,11 @@
-/* Copyright (c) 2010-2020. The SimGrid Team.
+/* Copyright (c) 2010-2022. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "simgrid/Exception.hpp"
+#include "simgrid/version.h"
 #include "src/instr/instr_private.hpp"
 #include "src/smpi/include/private.hpp"
 #include "xbt/virtu.h" /* xbt::cmdline */
@@ -19,7 +20,7 @@ void dump_generator_version()
   tracing_file << "#This file was generated using SimGrid-" << SIMGRID_VERSION_MAJOR << "." << SIMGRID_VERSION_MINOR
                << "." << SIMGRID_VERSION_PATCH << std::endl;
   tracing_file << "#[";
-  for (auto str : simgrid::xbt::cmdline) {
+  for (auto const& str : simgrid::xbt::cmdline) {
     tracing_file << str << " ";
   }
   tracing_file << "]" << std::endl;