]> AND Private Git Repository - loba.git/blobdiff - neighbor.cpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
Wip++...
[loba.git] / neighbor.cpp
index e7a4666151df22ecc771ef1c9c883cfdb8e4f0ec..8715396e9d2be53313dc35c85a34e88b19ba3a8d 100644 (file)
@@ -1,18 +1,16 @@
-#include <xbt/sysdep.h>
 #include "neighbor.h"
 
 neighbor::neighbor(const char* hostname)
 #include "neighbor.h"
 
 neighbor::neighbor(const char* hostname)
+    : name(hostname)
+    , ctrl_mbox(hostname)
+    , data_mbox(hostname)
+    , load(std::numeric_limits<double>::infinity())
+    , debt(0.0)
 {
 {
-    load = std::numeric_limits<double>::infinity();
-    debt = 0.0;
-    name = xbt_strdup(hostname);
-    ctrl_mbox = bprintf("%s_ctrl", hostname);
-    data_mbox = bprintf("%s_data", hostname);
+    ctrl_mbox += "_ctrl";
+    data_mbox += "_data";
 }
 
 neighbor::~neighbor()
 {
 }
 
 neighbor::~neighbor()
 {
-    free(data_mbox);
-    free(ctrl_mbox);
-    free(name);
 }
 }