summaryrefslogtreecommitdiff
path: root/controller
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2017-11-08 19:52:36 -0500
committerAdam Ierymenko <adam.ierymenko@gmail.com>2017-11-08 19:52:36 -0500
commitef224c3547b31e8a9aecad7750487e09d68e00f0 (patch)
tree3dbc17b2d725444f2022c328465ac708f702223b /controller
parentc12b68a6b2f8597e374a4c1386c2b95f4291932e (diff)
downloadinfinitytier-ef224c3547b31e8a9aecad7750487e09d68e00f0.tar.gz
infinitytier-ef224c3547b31e8a9aecad7750487e09d68e00f0.zip
RethinkDB build fix.
Diffstat (limited to 'controller')
-rw-r--r--controller/RethinkDB.hpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/controller/RethinkDB.hpp b/controller/RethinkDB.hpp
index 6efa5624..561cbdab 100644
--- a/controller/RethinkDB.hpp
+++ b/controller/RethinkDB.hpp
@@ -45,6 +45,11 @@ public:
virtual void nodeIsOnline(const uint64_t networkId,const uint64_t memberId);
protected:
+ struct _PairHasher
+ {
+ inline std::size_t operator()(const std::pair<uint64_t,uint64_t> &p) const { return (std::size_t)(p.first ^ p.second); }
+ };
+
std::string _host;
std::string _db;
std::string _auth;
@@ -58,7 +63,7 @@ protected:
BlockingQueue< nlohmann::json * > _commitQueue;
std::thread _commitThread[ZT_CONTROLLER_RETHINKDB_COMMIT_THREADS];
- std::unordered_map< std::pair<uint64_t,uint64_t>,int64_t > _lastOnline;
+ std::unordered_map< std::pair<uint64_t,uint64_t>,int64_t,_PairHasher > _lastOnline;
mutable std::mutex _lastOnline_l;
std::thread _onlineNotificationThread;