simgrid::simix::Exec::Exec(const char*name, sg_host_t hostarg)
{
- this->name = name;
+ if (name)
+ this->name = name;
this->state = SIMIX_RUNNING;
this->host = hostarg;
}
if (surf_exec) {
surf_exec->unref();
- surf_exec = NULL;
+ surf_exec = nullptr;
}
/* If there are simcalls associated with the synchro, then answer them */
- if (xbt_fifo_size(simcalls))
+ if (!simcalls.empty())
SIMIX_execution_finish(this);
}