MCPcopy Create free account
hub / github.com/abbeycode/UnrarKit / operator ==

Method operator ==

Libraries/unrar/hash.cpp:29–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27
28
29bool HashValue::operator == (const HashValue &cmp)
30{
31 if (Type==HASH_NONE || cmp.Type==HASH_NONE)
32 return true;
33 if (Type==HASH_RAR14 && cmp.Type==HASH_RAR14 ||
34 Type==HASH_CRC32 && cmp.Type==HASH_CRC32)
35 return CRC32==cmp.CRC32;
36 if (Type==HASH_BLAKE2 && cmp.Type==HASH_BLAKE2)
37 return memcmp(Digest,cmp.Digest,sizeof(Digest))==0;
38 return false;
39}
40
41
42DataHash::DataHash()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected