mirror of
https://github.com/reactos/reactos.git
synced 2024-11-27 05:23:33 +08:00
[NTOS:CM] Implement COMPUTE_HASH_CHAR macro definition
Wrap the hash computation formula in a macro so that we don't have to copy the logic over the places again and again.
This commit is contained in:
parent
a4213d491d
commit
26fe3616fe
@ -12,6 +12,12 @@
|
||||
#define GET_HASH_KEY(ConvKey) \
|
||||
((CMP_HASH_IRRATIONAL * (ConvKey)) % CMP_HASH_PRIME)
|
||||
|
||||
//
|
||||
// Computes the hashkey of a character
|
||||
//
|
||||
#define COMPUTE_HASH_CHAR(ConvKey, Char) \
|
||||
(37 * ConvKey + RtlUpcaseUnicodeChar(Char))
|
||||
|
||||
//
|
||||
// Returns the index into the hash table, or the entry itself
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user