-/* Copyright (c) 2004-2019. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2004-2020. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
XBT_PUBLIC void simgrid_add_plugin_description(const char* name, const char* description, void_f_void_t init_fun)
{
if (not surf_plugin_description)
- surf_plugin_description = new std::vector<surf_model_description_t>;
+ surf_plugin_description = new std::vector<surf_model_description_t>();
surf_plugin_description->emplace_back(surf_model_description_t{name, description, init_fun});
}
auto pos = std::find_if(table.begin(), table.end(),
[&name](const surf_model_description_t& item) { return item.name == name; });
if (pos != table.end())
- return std::distance(table.begin(), pos);
+ return static_cast<int>(std::distance(table.begin(), pos));
if (table.empty())
xbt_die("No model is valid! This is a bug.");
xbt_init(argc, argv);
sg_config_init(argc, argv);
-
- if (MC_is_active())
- MC_memory_init();
}
void surf_exit()
{
simgrid::s4u::Engine::shutdown();
for (auto const& e : storage_types) {
- simgrid::kernel::resource::StorageType* stype = e.second;
+ const simgrid::kernel::resource::StorageType* stype = e.second;
delete stype->properties;
delete stype->model_properties;
delete stype;