Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/kernel')
-rw-r--r--source/kernel/SConscript2
-rw-r--r--source/kernel/gen_system/GEN_HashedPtr.cpp9
2 files changed, 8 insertions, 3 deletions
diff --git a/source/kernel/SConscript b/source/kernel/SConscript
index 8bd1a18f835..908e059ceab 100644
--- a/source/kernel/SConscript
+++ b/source/kernel/SConscript
@@ -7,4 +7,4 @@ sources += ' gen_system/SYS_System.cpp'
incs = 'gen_messaging gen_system #/intern/string #/intern/moto/include #/source/blender/blenloader '
-env.BlenderLib ( 'bf_kernel', Split(sources), Split(incs), [], libtype = ['common','game2', 'player'], priority = [15, 10, 150] )
+env.BlenderLib ( 'bf_kernel', Split(sources), Split(incs), [], libtype = ['core', 'player'], priority = [400, 150] )
diff --git a/source/kernel/gen_system/GEN_HashedPtr.cpp b/source/kernel/gen_system/GEN_HashedPtr.cpp
index 6dbed1fb7a8..ff9de465a34 100644
--- a/source/kernel/gen_system/GEN_HashedPtr.cpp
+++ b/source/kernel/gen_system/GEN_HashedPtr.cpp
@@ -40,11 +40,12 @@
// is a 32-bit integer, use all the bits of the pointer as long
// as possible.
//
-
+#if 1
unsigned int GEN_Hash(void * inDWord)
{
uintptr_t key = (uintptr_t)inDWord;
-
+#if 0
+ // this is way too complicated
key += ~(key << 16);
key ^= (key >> 5);
key += (key << 3);
@@ -53,4 +54,8 @@ unsigned int GEN_Hash(void * inDWord)
key ^= (key >> 17);
return (unsigned int)(key & 0xffffffff);
+#else
+ return (unsigned int)(key ^ (key>>4));
+#endif
}
+#endif \ No newline at end of file