@nxtedition/rocksdb 8.1.0 → 8.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/max_rev_operator.h
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
#pragma once
|
|
2
2
|
|
|
3
|
+
#include <cstddef>
|
|
3
4
|
#include <rocksdb/slice.h>
|
|
4
5
|
#include <rocksdb/merge_operator.h>
|
|
5
6
|
|
|
6
7
|
int compareRev(const rocksdb::Slice& a, const rocksdb::Slice& b) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
const
|
|
8
|
+
std::size_t indexA = 0;
|
|
9
|
+
std::size_t indexB = 0;
|
|
10
|
+
const std::size_t endA = a[indexA++];
|
|
11
|
+
const std::size_t endB = b[indexB++];
|
|
11
12
|
|
|
12
13
|
// Compare the revision number
|
|
13
14
|
auto result = 0;
|
|
@@ -97,4 +98,4 @@ class MaxRevOperator : public rocksdb::MergeOperator {
|
|
|
97
98
|
static const char* kNickName() { return "maxRev"; }
|
|
98
99
|
const char* Name() const override { return kClassName(); }
|
|
99
100
|
const char* NickName() const override { return kNickName(); }
|
|
100
|
-
};
|
|
101
|
+
};
|
package/package.json
CHANGED
|
Binary file
|