mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 04:43:53 +00:00
Make callstack hash less shitty.
This commit is contained in:
parent
ab2945b988
commit
d7a85983a5
@ -20,10 +20,10 @@ public:
|
|||||||
: m_size( size )
|
: m_size( size )
|
||||||
, m_ptr( data )
|
, m_ptr( data )
|
||||||
{
|
{
|
||||||
T hash = 0;
|
T hash = 5381;
|
||||||
for( uint8_t i=0; i<size; i++ )
|
for( uint8_t i=0; i<size; i++ )
|
||||||
{
|
{
|
||||||
hash += data[i];
|
hash = ( ( hash << 5 ) + hash ) ^ data[i];
|
||||||
}
|
}
|
||||||
m_hash = uint32_t( hash );
|
m_hash = uint32_t( hash );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user