MCPcopy Create free account
hub / github.com/JACoders/OpenJK / Add

Method Add

code/qcommon/hstring.cpp:224–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

222 }
223 }
224 void Add(int hash,int value)
225 {
226 assert(hash>=0&&hash<MAX_HASH);
227 assert(value); // 0 is the empty marker
228 int i=hash;
229 while (mHashes[i])
230 {
231 assert(mHashes[i]!=value); //please don't insert things twice
232 i=(i+1)&(MAX_HASH-1);
233 assert(i!=hash); //hash table is full?
234 }
235 mHashes[i]=value;
236 }
237 int FindFirst(int hash)
238 {
239 mFindPtr=hash;

Callers 1

InitMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected