Package Kit, WebPositive: Standardize string hashes.
Use either HashString or BString::HashValue (both of which currently use the "modified hashpjw".)
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
#include <new>
|
||||
|
||||
#include <String.h>
|
||||
#include <util/OpenHashTable.h>
|
||||
|
||||
|
||||
@@ -18,9 +19,6 @@ namespace BHPKG {
|
||||
namespace BPrivate {
|
||||
|
||||
|
||||
uint32 hash_string(const char* string);
|
||||
|
||||
|
||||
struct CachedString {
|
||||
char* string;
|
||||
int32 index;
|
||||
@@ -57,7 +55,7 @@ struct CachedStringHashDefinition {
|
||||
|
||||
size_t HashKey(const char* key) const
|
||||
{
|
||||
return hash_string(key);
|
||||
return BString::HashValue(key);
|
||||
}
|
||||
|
||||
size_t Hash(const CachedString* value) const
|
||||
|
||||
Reference in New Issue
Block a user