MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / zuiCompareByCardinality

Function zuiCompareByCardinality

src/t_zset.cpp:2340–2346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2338}
2339
2340int zuiCompareByCardinality(const void *s1, const void *s2) {
2341 unsigned long first = zuiLength((zsetopsrc*)s1);
2342 unsigned long second = zuiLength((zsetopsrc*)s2);
2343 if (first > second) return 1;
2344 if (first < second) return -1;
2345 return 0;
2346}
2347
2348static int zuiCompareByRevCardinality(const void *s1, const void *s2) {
2349 return zuiCompareByCardinality(s1, s2) * -1;

Callers 1

Calls 1

zuiLengthFunction · 0.85

Tested by

no test coverage detected