Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Replace redundant type with "auto" (include/ and src/).
[simgrid.git] / src / surf / xml / surfxml_sax_cb.cpp
index 43d1dbeafbddf0932ce4c6a2402a57ed75a4879a..09f67cdf811fd154d6c6b12550b4dda9011d2cc8 100644 (file)
@@ -97,7 +97,7 @@ int surf_parse_get_int(const std::string& s)
 /* Turn something like "1-4,6,9-11" into the vector {1,2,3,4,6,9,10,11} */
 static std::vector<int>* explodesRadical(const std::string& radicals)
 {
-  std::vector<int>* exploded = new std::vector<int>();
+  auto* exploded = new std::vector<int>();
 
   // Make all hosts
   std::vector<std::string> radical_elements;
@@ -182,8 +182,9 @@ void ETag_surfxml_storage___type()
   storage_type.content = A_surfxml_storage___type_content;
   storage_type.id      = A_surfxml_storage___type_id;
   storage_type.model   = A_surfxml_storage___type_model;
-  storage_type.size    = surf_parse_get_size(surf_parsed_filename, surf_parse_lineno, A_surfxml_storage___type_size,
-                                          "size of storage type", storage_type.id.c_str());
+  storage_type.size =
+      static_cast<sg_size_t>(surf_parse_get_size(surf_parsed_filename, surf_parse_lineno, A_surfxml_storage___type_size,
+                                                 "size of storage type", storage_type.id.c_str()));
   sg_platf_new_storage_type(&storage_type);
 }