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

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Taudul <wolf.pld@gmail.com>2018-06-24 18:30:54 +0300
committerBartosz Taudul <wolf.pld@gmail.com>2018-06-24 18:30:54 +0300
commitd7a85983a571ea8590f8c3eec41ef6b350d34e0d (patch)
tree2b31b78a6d14540e8ad347c241abb4b3a12e34e7 /server/TracyVarArray.hpp
parentab2945b9883a87b0ac9fc7b82c9ae8869b2db865 (diff)
Make callstack hash less shitty.
Diffstat (limited to 'server/TracyVarArray.hpp')
-rw-r--r--server/TracyVarArray.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/TracyVarArray.hpp b/server/TracyVarArray.hpp
index e8dc0283..938a9b16 100644
--- a/server/TracyVarArray.hpp
+++ b/server/TracyVarArray.hpp
@@ -20,10 +20,10 @@ public:
: m_size( size )
, m_ptr( data )
{
- T hash = 0;
+ T hash = 5381;
for( uint8_t i=0; i<size; i++ )
{
- hash += data[i];
+ hash = ( ( hash << 5 ) + hash ) ^ data[i];
}
m_hash = uint32_t( hash );
}