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

Private GIT Repository
Convert clock_type to enum class.
[loba.git] / process.h
index 55ee792e1e59d56751fbe6157e858ee1a0acde58..f01c3c62f73e6d9130bac148bcf9ac444ee603ac 100644 (file)
--- a/process.h
+++ b/process.h
@@ -1,18 +1,9 @@
 #ifndef PROCESS_H
 #define PROCESS_H
 
-#define USE_UNORDERED_MAP 1
-//#undef USE_UNORDERED_MAP
-
 #include <algorithm>
 #include <atomic>
-#ifdef USE_UNORDERED_MAP
-#  include <unordered_map>
-#  define MAP_TEMPLATE std::unordered_map
-#else
-#  include <map>
-#  define MAP_TEMPLATE std::map
-#endif
+#include <unordered_map>
 #include <vector>
 #include <simgrid/msg.h>
 #include <xbt/log.h>
@@ -102,7 +93,7 @@ private:
 
     static std::atomic<int> convergence_counter;
 
-    typedef MAP_TEMPLATE<msg_host_t, neighbor*> rev_neigh_type;
+    typedef std::unordered_map<msg_host_t, neighbor*> rev_neigh_type;
     neigh_type neigh;           // list of neighbors (do not alter
                                 // after construction!)
     rev_neigh_type rev_neigh;   // map msg_host_t -> neighbor