Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix comments.
[simgrid.git] / src / surf / surf_interface.cpp
index 624ee54..9170f1d 100644 (file)
@@ -126,7 +126,7 @@ double surf_get_clock()
   return NOW;
 }
 
-/* returns whether #file_path is a absolute file path. Surprising, isn't it ? */
+/* returns whether #file_path is an absolute file path. Surprising, isn't it ? */
 static bool is_absolute_file_path(const std::string& file_path)
 {
 #ifdef _WIN32
@@ -147,7 +147,7 @@ std::ifstream* surf_ifsopen(const std::string& name)
 {
   xbt_assert(not name.empty());
 
-  std::ifstream* fs = new std::ifstream();
+  auto* fs = new std::ifstream();
   if (is_absolute_file_path(name)) { /* don't mess with absolute file names */
     fs->open(name.c_str(), std::ifstream::in);
   }
@@ -197,7 +197,7 @@ int find_model_description(const std::vector<surf_model_description_t>& table, c
   auto pos = std::find_if(table.begin(), table.end(),
                           [&name](const surf_model_description_t& item) { return item.name == name; });
   if (pos != table.end())
-    return std::distance(table.begin(), pos);
+    return static_cast<int>(std::distance(table.begin(), pos));
 
   if (table.empty())
     xbt_die("No model is valid! This is a bug.");