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

Function fixHashPerm16

src/String.cpp:1018–1022  ·  view source on GitHub ↗

InternalCreateConstBuffer is not uft16 aware whenit come to hashes

Source from the content-addressed store, hash-verified

1016
1017// InternalCreateConstBuffer is not uft16 aware whenit come to hashes
1018static void fixHashPerm16(const String &str)
1019{
1020 unsigned int hash = str.calcHash();
1021 ((unsigned int *)str.raw_ptr())[-2] = hash;
1022}
1023
1024
1025static unsigned char safeChars[256];

Callers 3

String.cppFile · 0.85
fromCharCodeMethod · 0.85
__bootMethod · 0.85

Calls 1

calcHashMethod · 0.80

Tested by

no test coverage detected