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

Function dmHashClone32

engine/dlib/src/dlib/hash.cpp:352–368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

350}
351
352void dmHashClone32(HashState32* hash_state, const HashState32* source_hash_state, bool reverse_hash)
353{
354 memcpy(hash_state, source_hash_state, sizeof(HashState32));
355 if(dmHashContainer().m_Enabled && source_hash_state->m_ReverseHashEntryIndex)
356 {
357 if(reverse_hash)
358 {
359 DM_MUTEX_SCOPED_LOCK(dmHashContainer().m_Mutex);
360 uint32_t new_index = hash_state->m_ReverseHashEntryIndex = dmHashContainer().AllocReverseHashStatesSlot();
361 dmHashContainer().CloneReverseHashState(new_index, source_hash_state->m_ReverseHashEntryIndex);
362 }
363 else
364 {
365 hash_state->m_ReverseHashEntryIndex = 0;
366 }
367 }
368}
369
370static void MixTail32(HashState32* hash_state, const unsigned char * & data, int & len)
371{

Callers 3

TEST_FFunction · 0.85
ReHashFunction · 0.85

Calls 2

CloneReverseHashStateMethod · 0.80

Tested by 2

TEST_FFunction · 0.68