rule_based_prefetcher: actually implement hashing
This file is apparently not part of the image so I don't know how to test these changes.
This commit is contained in:
@@ -148,18 +148,19 @@ class RuleMatcher {
|
||||
team_rules *fRules;
|
||||
};
|
||||
|
||||
|
||||
struct RuleHash {
|
||||
typedef char* KeyType;
|
||||
typedef rules ValueType;
|
||||
|
||||
size_t HashKey(KeyType key) const
|
||||
{
|
||||
return key >> 1;
|
||||
return hash_hash_string(key);
|
||||
}
|
||||
|
||||
size_t Hash(ValueType* value) const
|
||||
{
|
||||
return HashKey(value->bar);
|
||||
return HashKey(value->name);
|
||||
}
|
||||
|
||||
bool Compare(KeyType key, ValueType* rules) const
|
||||
@@ -173,6 +174,7 @@ struct RuleHash {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
struct TeamHash {
|
||||
typedef team_id KeyType;
|
||||
typedef team_rules ValueType;
|
||||
|
||||
Reference in New Issue
Block a user