Skip to content

Commit 5a152d6

Browse files
committed
Squashed 'src/leveldb/' changes from 4188247086..113db4962b
113db4962b Merge bitcoin-core/leveldb-subtree#51: refactor: add missing overrides 9defe8494a refactor: add missing overrides git-subtree-dir: src/leveldb git-subtree-split: 113db4962b8be416c17ad2b4bdcc5514c51d7181
1 parent a130bbd commit 5a152d6

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

db/c.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -471,11 +471,11 @@ leveldb_filterpolicy_t* leveldb_filterpolicy_create_bloom(int bits_per_key) {
471471
static void DoNothing(void*) {}
472472

473473
~Wrapper() { delete rep_; }
474-
const char* Name() const { return rep_->Name(); }
475-
void CreateFilter(const Slice* keys, int n, std::string* dst) const {
474+
const char* Name() const override { return rep_->Name(); }
475+
void CreateFilter(const Slice* keys, int n, std::string* dst) const override {
476476
return rep_->CreateFilter(keys, n, dst);
477477
}
478-
bool KeyMayMatch(const Slice& key, const Slice& filter) const {
478+
bool KeyMayMatch(const Slice& key, const Slice& filter) const override {
479479
return rep_->KeyMayMatch(key, filter);
480480
}
481481

db/db_test.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,17 +139,17 @@ class SpecialEnv : public EnvWrapper {
139139
public:
140140
DataFile(SpecialEnv* env, WritableFile* base) : env_(env), base_(base) {}
141141
~DataFile() { delete base_; }
142-
Status Append(const Slice& data) {
142+
Status Append(const Slice& data) override {
143143
if (env_->no_space_.load(std::memory_order_acquire)) {
144144
// Drop writes on the floor
145145
return Status::OK();
146146
} else {
147147
return base_->Append(data);
148148
}
149149
}
150-
Status Close() { return base_->Close(); }
151-
Status Flush() { return base_->Flush(); }
152-
Status Sync() {
150+
Status Close() override { return base_->Close(); }
151+
Status Flush() override { return base_->Flush(); }
152+
Status Sync() override {
153153
if (env_->data_sync_error_.load(std::memory_order_acquire)) {
154154
return Status::IOError("simulated data sync error");
155155
}
@@ -168,16 +168,16 @@ class SpecialEnv : public EnvWrapper {
168168
public:
169169
ManifestFile(SpecialEnv* env, WritableFile* b) : env_(env), base_(b) {}
170170
~ManifestFile() { delete base_; }
171-
Status Append(const Slice& data) {
171+
Status Append(const Slice& data) override {
172172
if (env_->manifest_write_error_.load(std::memory_order_acquire)) {
173173
return Status::IOError("simulated writer error");
174174
} else {
175175
return base_->Append(data);
176176
}
177177
}
178-
Status Close() { return base_->Close(); }
179-
Status Flush() { return base_->Flush(); }
180-
Status Sync() {
178+
Status Close() override { return base_->Close(); }
179+
Status Flush() override { return base_->Flush(); }
180+
Status Sync() override {
181181
if (env_->manifest_sync_error_.load(std::memory_order_acquire)) {
182182
return Status::IOError("simulated sync error");
183183
} else {

db/log_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ class LogTest {
205205

206206
return Status::OK();
207207
}
208-
std::string GetName() const { return ""; }
208+
std::string GetName() const override { return ""; }
209209

210210
Slice contents_;
211211
bool force_error_;

table/table_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class StringSource : public RandomAccessFile {
129129
return Status::OK();
130130
}
131131

132-
std::string GetName() const { return ""; }
132+
std::string GetName() const override { return ""; }
133133
private:
134134
std::string contents_;
135135
};

0 commit comments

Comments
 (0)