-/* Copyright (c) 2017-2018. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2017-2019. 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. */
simgrid::s4u::Link::on_state_change.connect([](simgrid::s4u::Link& link) { link.extension<LinkEnergy>()->update(); });
simgrid::s4u::Link::on_destruction.connect([](simgrid::s4u::Link& link) {
- if (strcmp(link.get_cname(), "__loopback__"))
+ if (link.get_name() != "__loopback__")
XBT_INFO("Energy consumption of link '%s': %f Joules", link.get_cname(),
link.extension<LinkEnergy>()->get_consumed_energy());
});