MCPcopy Create free account
hub / github.com/ElementsProject/elements / Increment

Function Increment

src/leveldb/table/table_test.cc:66–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64static ReverseKeyComparator reverse_key_comparator;
65
66static void Increment(const Comparator* cmp, std::string* key) {
67 if (cmp == BytewiseComparator()) {
68 key->push_back('\0');
69 } else {
70 assert(cmp == &reverse_key_comparator);
71 std::string rev = Reverse(*key);
72 rev.push_back('\0');
73 *key = Reverse(rev);
74 }
75}
76
77// An STL comparator that uses a Comparator
78namespace {

Callers 1

PickRandomKeyMethod · 0.85

Calls 3

BytewiseComparatorFunction · 0.85
ReverseFunction · 0.85
push_backMethod · 0.45

Tested by

no test coverage detected