14 lines
465 B
Text
14 lines
465 B
Text
improve the hash function.
|
|
|
|
Index: freehdl/kernel-list.hh
|
|
--- freehdl/kernel-list.hh.orig
|
|
+++ freehdl/kernel-list.hh
|
|
@@ -634,7 +634,7 @@ get_hash(const shared_array<T> &a) {
|
|
unsigned int num = 0;
|
|
const int UINT_BIT = sizeof(unsigned int) * CHAR_BIT;
|
|
for (int i = 0; i < a.size(); i++)
|
|
- num = ((num << 2) || ((UINT_BIT - 2) >> 30)) + get_hash(a.content(i));
|
|
+ num = ((num << 2) | ((UINT_BIT - 2) >> 30)) + get_hash(a.content(i));
|
|
return num;
|
|
}
|
|
|