namespace std {
template<> struct hash<hobject_t> {
size_t operator()(const hobject_t &r) const {
- static rjhash<uint64_t> I;
- return r.get_hash() ^ I(r.snap);
+ static std::hash<object_t> H;
+ static rjhash<uint64_t> RJ;
+ size_t hash;
+ hash = H(r.oid);
+ hash = RJ(hash ^ r.get_hash());
+ hash = RJ(hash ^ r.snap);
+ return hash;
}
};
} // namespace std
namespace std {
template<> struct hash<ghobject_t> {
size_t operator()(const ghobject_t &r) const {
- static rjhash<uint64_t> I;
- return r.hobj.get_hash() ^ I(r.hobj.snap);
+ static rjhash<uint64_t> RJ;
+ static hash<hobject_t> HO;
+ size_t hash = HO(r.hobj);
+ hash = RJ(hash ^ r.generation);
+ hash = hash ^ r.shard_id.id;
+ return hash;
}
};
} // namespace std