Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Reduce scope for temporary variables.
[simgrid.git] / src / smpi / mpi / smpi_f2c.cpp
index aff6ef4..746a3b4 100644 (file)
@@ -26,8 +26,7 @@ F2C::F2C() = default;
 int F2C::add_f()
 {
   allocate_lookup();
-  auto loc = smpi_process()->call_location();
-  if(loc && loc->linenumber != 0)
+  if (auto loc = smpi_process()->call_location(); loc && loc->linenumber != 0)
     call_location_= std::string (loc->filename + ":" + std::to_string(loc->linenumber));
   my_f2c_id_                 = global_f2c_id();
   (*f2c_lookup_)[my_f2c_id_] = this;