Individualize NameHashSet Hashing & Revisit #709 (#740)

* Make mac/win lookups lowercase'd

* Revert #709 & 81042cc

* Adjust HashPolicy implementation across sourcemod

Basically, in order to implement our own (actual) hash policy in
`PluginSys.h`, we needed to remove the blanket implementation of `hash`
that was used before. Now, each policy must implement `hash` along with
`matches` in order to be used with `NameHashSet`. While this does force
us to change every implementation of policies across the entirety of
sourcemod, it allows core to use flexible implementations of `hash`.

* Remove logic duplication

* Improve lowercase checks
This commit is contained in:
Michael Flaherty
2018-07-10 17:38:40 -04:00
committed by Nicholas Hastings
parent daee19d502
commit aaac0b9eb2
15 changed files with 99 additions and 40 deletions
+4
View File
@@ -111,6 +111,10 @@ struct QHandleType
{
return type->name && type->name->compare(key) == 0;
}
static inline uint32_t hash(const detail::CharsAndLength &key)
{
return key.hash();
}
};
typedef ke::Lambda<void(const char *)> HandleReporter;