Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Minor sonar issues.
[simgrid.git] / src / surf / xml / surfxml_sax_cb.cpp
index f8fcade1277b9964571c527ae2ff99c8e1060e5c..c486699284867979184710d412fa480ff1932009 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;
@@ -735,7 +735,7 @@ void STag_surfxml_trace___connect()
 void STag_surfxml_AS()
 {
   AX_surfxml_zone_id = AX_surfxml_AS_id;
-  AX_surfxml_zone_routing = (AT_surfxml_zone_routing)AX_surfxml_AS_routing;
+  AX_surfxml_zone_routing = AX_surfxml_AS_routing;
   STag_surfxml_zone();
 }
 
@@ -749,7 +749,7 @@ void STag_surfxml_zone()
   property_sets.push_back(new std::unordered_map<std::string, std::string>());
   simgrid::kernel::routing::ZoneCreationArgs zone;
   zone.id      = A_surfxml_zone_id;
-  zone.routing = static_cast<int>(A_surfxml_zone_routing);
+  zone.routing = A_surfxml_zone_routing;
   sg_platf_new_Zone_begin(&zone);
 }
 
@@ -849,7 +849,7 @@ void ETag_surfxml_actor()
 }
 
 void STag_surfxml_argument(){
-  arguments.push_back(A_surfxml_argument_value);
+  arguments.emplace_back(A_surfxml_argument_value);
 }
 
 void STag_surfxml_model___prop(){