-/* Copyright (c) 2013-2022. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2013-2023. 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. */
************/
HostImpl::HostImpl(const std::string& name) : piface_(this), name_(name)
{
- s4u_enforce(s4u::Host::by_name_or_null(name_) == nullptr, "Refusing to create a second host named '%s'.", get_cname());
+ xbt_enforce(s4u::Host::by_name_or_null(name_) == nullptr, "Refusing to create a second host named '%s'.", get_cname());
}
HostImpl::~HostImpl()
try {
std::string actors;
for (auto const& actor : actor_list_)
- actors += "\n\t" + std::string(actor.get_name());
+ actors += "\n\t" + actor.get_name();
EngineImpl::get_instance()->display_all_actor_status();
xbt_die("%s:%s", msg, actors.c_str());
auto* cpu =
englobing_zone_->get_cpu_vm_model()->create_cpu(vm, speeds)->set_core_count(vm->get_vm_impl()->get_core_amount());
- if (get_iface()->get_pstate() != 0)
- cpu->set_pstate(get_iface()->get_pstate());
-
cpu->seal();
+ if (get_iface()->get_pstate() != 0) {
+ cpu->set_pstate(get_iface()->get_pstate());
+ }
+
/* Currently, a VM uses the network resource of its physical host */
vm->set_netpoint(get_iface()->get_netpoint());