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

Private GIT Repository
Add units in XML files.
[loba.git] / process.h
index 81e68d9006e8a02ffd6aa798728cf4302f31ccc7..55ee792e1e59d56751fbe6157e858ee1a0acde58 100644 (file)
--- a/process.h
+++ b/process.h
@@ -6,7 +6,6 @@
 
 #include <algorithm>
 #include <atomic>
-#include <functional>
 #ifdef USE_UNORDERED_MAP
 #  include <unordered_map>
 #  define MAP_TEMPLATE std::unordered_map
@@ -15,7 +14,7 @@
 #  define MAP_TEMPLATE std::map
 #endif
 #include <vector>
-#include <msg/msg.h>
+#include <simgrid/msg.h>
 #include <xbt/log.h>
 #include "communicator.h"
 #include "misc.h"
@@ -205,12 +204,10 @@ private:
 template <typename Compare>
 void process::pneigh_sort_by_load(const Compare& comp)
 {
-    using std::placeholders::_1;
-    using std::placeholders::_2;
     std::sort(pneigh.begin(), pneigh.end(),
-              std::bind(comp,
-                        std::bind(&neighbor::get_load, _1),
-                        std::bind(&neighbor::get_load, _2)));
+              [&comp](const neighbor* a, const neighbor* b) {
+                  return comp(a->get_load(), b->get_load());
+              });
 }
 
 #endif // !PROCESS_H