X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d33e7a563a884247bff85406dcc589a70a162e79..17220d6ffb4bca0c9278eca0e3e8598ec76cc0f0:/src/surf/surf_interface.cpp diff --git a/src/surf/surf_interface.cpp b/src/surf/surf_interface.cpp index cf5f486fa7..249ee2314d 100644 --- a/src/surf/surf_interface.cpp +++ b/src/surf/surf_interface.cpp @@ -161,9 +161,8 @@ FILE *surf_fopen(const char *name, const char *mode) /* search relative files in the path */ for (auto path_elm : surf_path) { - char* buff = bprintf("%s" FILE_DELIM "%s", path_elm.c_str(), name); - file = fopen(buff, mode); - free(buff); + std::string buff = path_elm + FILE_DELIM + name; + file = fopen(buff.c_str(), mode); if (file) return file; @@ -379,9 +378,9 @@ void surf_exit() delete stype->model_properties; free(stype); } - for (auto s : *simgrid::surf::StorageImpl::storages) + for (auto s : *simgrid::surf::StorageImpl::storagesMap()) delete s.second; - delete simgrid::surf::StorageImpl::storages; + delete simgrid::surf::StorageImpl::storagesMap(); for (auto model : *all_existing_models) delete model; @@ -739,8 +738,6 @@ void Action::setMaxDuration(double duration) heapRemove(getModel()->getActionHeap()); } -void Action::gapRemove() {} - void Action::setSharingWeight(double weight) { XBT_IN("(%p,%g)", this, weight);