File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,17 @@ class XrefItem
117
117
int row () const ;
118
118
bool operator ==(const XrefItem& other) const ;
119
119
bool operator !=(const XrefItem& other) const ;
120
+ size_t operator ()(const XrefItem& item) const
121
+ {
122
+ size_t hash = std::hash<uint64_t >()(item.addr ());
123
+ hash ^= std::hash<int >()(item.type ()) + 0x9e3779b9 + (hash << 6 ) + (hash >> 2 );
124
+ hash ^= std::hash<int >()(item.direction ()) + 0x9e3779b9 + (hash << 6 ) + (hash >> 2 );
125
+ hash ^= std::hash<int >()(item.kind ()) + 0x9e3779b9 + (hash << 6 ) + (hash >> 2 );
126
+ hash ^= std::hash<size_t >()(item.instrId ()) + 0x9e3779b9 + (hash << 6 ) + (hash >> 2 );
127
+ hash ^= std::hash<uint64_t >()(item.func () ? item.func ()->GetStart () : 0 ) + 0x9e3779b9 + (hash << 6 ) + (hash >> 2 );
128
+ hash ^= std::hash<int >()(item.ilType ()) + 0x9e3779b9 + (hash << 6 ) + (hash >> 2 );
129
+ return hash;
130
+ }
120
131
};
121
132
122
133
/* !
You can’t perform that action at this time.
0 commit comments