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

Method CloneReverseHashState

engine/dlib/src/dlib/hash.cpp:141–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139 }
140
141 inline void CloneReverseHashState(uint32_t state_index, uint32_t source_state_index)
142 {
143 assert(state_index != 0);
144 ReverseHashEntry& state = m_HashStates[state_index];
145 ReverseHashEntry& source_state = m_HashStates[source_state_index];
146 uint32_t length = source_state.m_Length;
147 state.m_Value = malloc(DM_ALIGN(length + 1, 16));
148 uint8_t* p = (uint8_t*) state.m_Value;
149 memcpy(p, source_state.m_Value, length);
150 p[length] = '\0';
151 state.m_Length = length;
152 }
153
154 inline void UpdateReversHashState(uint32_t state_index, uint32_t len, const void* buffer, uint32_t buffer_len)
155 {

Callers 2

dmHashClone32Function · 0.80
dmHashClone64Function · 0.80

Calls 2

mallocFunction · 0.85
assertFunction · 0.50

Tested by

no test coverage detected