MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / Finder

Class Finder

src/String.cpp:391–400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

389 hash = hash*223 + ((unsigned char *)inStr)[i];
390
391 struct Finder
392 {
393 int len;
394 const char *ptr;
395 Finder(int len, const char *inPtr) : len(len), ptr(inPtr) { }
396 bool operator==(const String &inStr) const
397 {
398 return len == inStr.length && !memcmp(ptr, inStr.__s, len*sizeof(char));
399 }
400 };
401 String found;
402 if (ctx->stringSet->findEquivalentKey(found, hash, Finder(len, inStr)))
403 return found.__s;

Callers 1

GCStringDupFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected