X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/56e0e49941217065d2a989dc4d4cf5e63fd0a9be..d469f50b8c4288a559b6e1c561b1c0e6efbec864:/src/surf/xml/surfxml_sax_cb.cpp diff --git a/src/surf/xml/surfxml_sax_cb.cpp b/src/surf/xml/surfxml_sax_cb.cpp index e81955b2c4..e426c40063 100644 --- a/src/surf/xml/surfxml_sax_cb.cpp +++ b/src/surf/xml/surfxml_sax_cb.cpp @@ -456,10 +456,9 @@ void ETag_surfxml_host() { buf = A_surfxml_host_speed; XBT_DEBUG("Buffer: %s", buf); - host.speed_per_pstate = new std::vector(); if (strchr(buf, ',') == nullptr){ double speed = surf_parse_get_speed(A_surfxml_host_speed,"speed of host", host.id); - host.speed_per_pstate->push_back(speed); + host.speed_per_pstate.push_back(speed); } else { xbt_dynar_t pstate_list = xbt_str_split(buf, ","); @@ -468,7 +467,7 @@ void ETag_surfxml_host() { xbt_dynar_foreach(pstate_list, i, speed_str) { xbt_str_trim(speed_str, nullptr); double speed = surf_parse_get_speed(speed_str,"speed of host", host.id); - host.speed_per_pstate->push_back(speed); + host.speed_per_pstate.push_back(speed); XBT_DEBUG("Speed value: %f", speed); } xbt_dynar_free(&pstate_list); @@ -482,7 +481,6 @@ void ETag_surfxml_host() { host.coord = A_surfxml_host_coordinates; sg_platf_new_host(&host); - delete host.speed_per_pstate; current_property_set = nullptr; }