MCPcopy Create free account
hub / github.com/ddnet/ddnet / GetItemIndexHashed

Function GetItemIndexHashed

src/engine/shared/snapshot.cpp:208–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206}
207
208static int GetItemIndexHashed(int Key, const CItemList *pHashlist)
209{
210 size_t HashId = CalcHashId(Key);
211 for(int i = 0; i < pHashlist[HashId].m_Num; i++)
212 {
213 if(pHashlist[HashId].m_aKeys[i] == Key)
214 return pHashlist[HashId].m_aIndex[i];
215 }
216
217 return -1;
218}
219
220int CSnapshotDelta::DiffItem(const int *pPast, const int *pCurrent, int *pOut, int Size)
221{

Callers 1

CreateDeltaMethod · 0.85

Calls 1

CalcHashIdFunction · 0.85

Tested by

no test coverage detected