static sg4::Host* get_best_host(const sg4::ExecPtr exec)
{
- sg4::Host* best_host;
+ sg4::Host* best_host = nullptr;
double min_EFT = std::numeric_limits<double>::max();
for (const auto& host : sg4::Engine::get_instance()->get_all_hosts()) {
}
/* Cleanup memory */
- for (auto const& host : e.get_all_hosts())
- delete host->get_data<double>();
+ for (auto const& h : e.get_all_hosts())
+ delete h->get_data<double>();
XBT_INFO("Simulation Time: %f", simgrid_get_clock());