X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/df7dd242cb1d449653076cc87a6020b2c6a8cbf5..cfb9d01b612672ececbff08a9fecef3d91aad7a4:/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 dfcc8c91ea..1afc67e4d1 100644 --- a/src/surf/xml/surfxml_sax_cb.cpp +++ b/src/surf/xml/surfxml_sax_cb.cpp @@ -232,23 +232,23 @@ double surf_parse_get_time(const char* string, const char* entity_kind, std::str double surf_parse_get_size(const char* string, const char* entity_kind, std::string name) { - static const unit_scale units{ - {"b", 0.125, 2, true}, {"b", 0.125, 10, true}, {"B", 1.0, 2, true}, {"B", 1.0, 10, true}}; + static const unit_scale units{std::make_tuple("b", 0.125, 2, true), std::make_tuple("b", 0.125, 10, true), + std::make_tuple("B", 1.0, 2, true), std::make_tuple("B", 1.0, 10, true)}; return surf_parse_get_value_with_unit(string, units, entity_kind, name, "Append 'B' to get bytes (or 'b' for bits but 1B = 8b).", "B"); } double surf_parse_get_bandwidth(const char* string, const char* entity_kind, std::string name) { - static const unit_scale units{ - {"bps", 0.125, 2, true}, {"bps", 0.125, 10, true}, {"Bps", 1.0, 2, true}, {"Bps", 1.0, 10, true}}; + static const unit_scale units{std::make_tuple("bps", 0.125, 2, true), std::make_tuple("bps", 0.125, 10, true), + std::make_tuple("Bps", 1.0, 2, true), std::make_tuple("Bps", 1.0, 10, true)}; return surf_parse_get_value_with_unit(string, units, entity_kind, name, "Append 'Bps' to get bytes per second (or 'bps' for bits but 1Bps = 8bps)", "Bps"); } double surf_parse_get_speed(const char* string, const char* entity_kind, std::string name) { - static const unit_scale units{{"f", 1.0, 10, true}, {"flops", 1.0, 10, false}}; + static const unit_scale units{std::make_tuple("f", 1.0, 10, true), std::make_tuple("flops", 1.0, 10, false)}; return surf_parse_get_value_with_unit(string, units, entity_kind, name, "Append 'f' or 'flops' to your speed to get flop per second", "f"); }