MCPcopy Create free account
hub / github.com/Norbyte/ositools / Find

Method Find

OsiInterface/DivInterface.cpp:260–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258 }
259
260 const char * GlobalStringTable::Find(char const * s, uint64_t length) const
261 {
262 auto const & entry = HashTable[Hash(s, length)];
263 auto numItems = entry.Count();
264 for (uint32_t i = 0; i < numItems; i++) {
265 const char * str = entry.Get(i);
266 // FIXME: length not available in buffer?
267 //unsigned strLength = *(uint16_t const *)(s - 4);
268 if (/*strLength == length && strncmp(s, str, length) == 0*/
269 str != nullptr && strcmp(s, str) == 0)
270 {
271 return str;
272 }
273 }
274
275 return nullptr;
276 }
277
278 uint32_t GlobalStringTable::Hash(char const * s, uint64_t length)
279 {

Callers 15

GetAttributeInfoMethod · 0.45
ObjectExistsMethod · 0.45
GetTypeInfoMethod · 0.45
SetAttributeStringMethod · 0.45
GetStatusByHandleMethod · 0.45
SyncStoryMethod · 0.45
CharacterGetCustomStatFunction · 0.45
StatusPreventApplyFunction · 0.45
OnApplyStatusMethod · 0.45
CreateWallFunction · 0.45
ToFixedStringFunction · 0.45

Calls 2

CountMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected