Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove unused type definitions.
[simgrid.git] / src / plugins / link_energy.cpp
index 08e0a73..5e27abd 100644 (file)
@@ -1,4 +1,4 @@
-/* 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. */
@@ -197,7 +197,7 @@ void sg_link_energy_plugin_init()
   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());
   });