MCPcopy Create free account
hub / github.com/defold/defold / dmHashClone64

Function dmHashClone64

engine/dlib/src/dlib/hash.cpp:483–499  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

481}
482
483void dmHashClone64(HashState64* hash_state, const HashState64* source_hash_state, bool reverse_hash)
484{
485 memcpy(hash_state, source_hash_state, sizeof(HashState64));
486 if(dmHashContainer().m_Enabled && source_hash_state->m_ReverseHashEntryIndex)
487 {
488 if(reverse_hash)
489 {
490 DM_MUTEX_SCOPED_LOCK(dmHashContainer().m_Mutex);
491 uint32_t new_index = hash_state->m_ReverseHashEntryIndex = dmHashContainer().AllocReverseHashStatesSlot();
492 dmHashContainer().CloneReverseHashState(new_index, source_hash_state->m_ReverseHashEntryIndex);
493 }
494 else
495 {
496 hash_state->m_ReverseHashEntryIndex = 0;
497 }
498 }
499}
500
501static void MixTail64(HashState64* hash_state, const unsigned char * & data, int & len)
502{

Callers 5

GetAbsoluteIdentifierFunction · 0.85
RecreateInstanceFunction · 0.85
TEST_FFunction · 0.85

Calls 2

CloneReverseHashStateMethod · 0.80

Tested by 2

TEST_FFunction · 0.68