From 74c563f94e4b02779465ead2b2dbce0db59e352a Mon Sep 17 00:00:00 2001
From: KunoiSayami
Date: Thu, 17 Feb 2022 14:11:18 +0800
Subject: merge: Merge remote-tracking branch google/main@4fb1468
Signed-off-by: KunoiSayami
---
doc/benchmark.html | 6 +++---
doc/index.md | 11 ++++++-----
2 files changed, 9 insertions(+), 8 deletions(-)
(limited to 'doc')
diff --git a/doc/benchmark.html b/doc/benchmark.html
index 1e0b4ef..80e6c2a 100644
--- a/doc/benchmark.html
+++ b/doc/benchmark.html
@@ -90,9 +90,9 @@ div.bsql {
Benchmark Source Code
We wrote benchmark tools for SQLite and Kyoto TreeDB based on LevelDB's db_bench. The code for each of the benchmarks resides here:
Custom Build Specifications
diff --git a/doc/index.md b/doc/index.md
index 01693ad..0f6d649 100644
--- a/doc/index.md
+++ b/doc/index.md
@@ -369,6 +369,7 @@ leveldb::Iterator* it = db->NewIterator(options);
for (it->SeekToFirst(); it->Valid(); it->Next()) {
...
}
+delete it;
```
### Key Layout
@@ -424,21 +425,21 @@ spaces. For example:
```c++
class CustomFilterPolicy : public leveldb::FilterPolicy {
private:
- FilterPolicy* builtin_policy_;
+ leveldb::FilterPolicy* builtin_policy_;
public:
- CustomFilterPolicy() : builtin_policy_(NewBloomFilterPolicy(10)) {}
+ CustomFilterPolicy() : builtin_policy_(leveldb::NewBloomFilterPolicy(10)) {}
~CustomFilterPolicy() { delete builtin_policy_; }
const char* Name() const { return "IgnoreTrailingSpacesFilter"; }
- void CreateFilter(const Slice* keys, int n, std::string* dst) const {
+ void CreateFilter(const leveldb::Slice* keys, int n, std::string* dst) const {
// Use builtin bloom filter code after removing trailing spaces
- std::vector trimmed(n);
+ std::vector trimmed(n);
for (int i = 0; i < n; i++) {
trimmed[i] = RemoveTrailingSpaces(keys[i]);
}
- return builtin_policy_->CreateFilter(trimmed.data(), n, dst);
+ builtin_policy_->CreateFilter(trimmed.data(), n, dst);
}
};
```
--
cgit v1.3.1