MCPcopy Create free account
hub / github.com/ElementsProject/elements / operator()

Method operator()

src/leveldb/db/memtable.cc:28–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26size_t MemTable::ApproximateMemoryUsage() { return arena_.MemoryUsage(); }
27
28int MemTable::KeyComparator::operator()(const char* aptr,
29 const char* bptr) const {
30 // Internal keys are encoded as length-prefixed strings.
31 Slice a = GetLengthPrefixedSlice(aptr);
32 Slice b = GetLengthPrefixedSlice(bptr);
33 return comparator.Compare(a, b);
34}
35
36// Encode a suitable internal key target for "target" and return it.
37// Uses *scratch as scratch space, and the returned pointer will point

Callers

nothing calls this directly

Calls 2

GetLengthPrefixedSliceFunction · 0.70
CompareMethod · 0.45

Tested by

no test coverage detected