Skip to content

Commit

Permalink
Be nice and mark them as virutal
Browse files Browse the repository at this point in the history
  • Loading branch information
stephan-hof committed Apr 1, 2014
1 parent dca6b61 commit 98301a8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions rocksdb/cpp/comparator_wrapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace py_rocks {
compare_callback(compare_callback)
{}

int Compare(const Slice& a, const Slice& b) const {
virtual int Compare(const Slice& a, const Slice& b) const {
string error_msg;
int val;

Expand All @@ -43,12 +43,12 @@ namespace py_rocks {
return val;
}

const char* Name() const {
virtual const char* Name() const {
return this->name.c_str();
}

void FindShortestSeparator(string* start, const Slice& limit) const {}
void FindShortSuccessor(string* key) const {}
virtual void FindShortestSeparator(string* start, const Slice& limit) const {}
virtual void FindShortSuccessor(string* key) const {}

void set_info_log(std::shared_ptr<Logger> info_log) {
this->info_log = info_log;
Expand Down
6 changes: 3 additions & 3 deletions rocksdb/cpp/filter_policy_wrapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace py_rocks {
key_may_match_callback(key_may_match_callback)
{}

void
virtual void
CreateFilter(const Slice* keys, int n, std::string* dst) const {
string error_msg;

Expand All @@ -53,7 +53,7 @@ namespace py_rocks {
}
}

bool
virtual bool
KeyMayMatch(const Slice& key, const Slice& filter) const {
string error_msg;
bool val;
Expand All @@ -71,7 +71,7 @@ namespace py_rocks {
return val;
}

const char* Name() const {
virtual const char* Name() const {
return this->name.c_str();
}

Expand Down
10 changes: 5 additions & 5 deletions rocksdb/cpp/merge_operator_wrapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace py_rocks {
merge_callback(merge_callback)
{}

bool Merge(
virtual bool Merge(
const Slice& key,
const Slice* existing_value,
const Slice& value,
Expand All @@ -44,7 +44,7 @@ namespace py_rocks {
logger);
}

const char* Name() const {
virtual const char* Name() const {
return this->name.c_str();
}

Expand Down Expand Up @@ -85,7 +85,7 @@ namespace py_rocks {
partial_merge_callback(partial_merge_callback)
{}

bool FullMerge(
virtual bool FullMerge(
const Slice& key,
const Slice* existing_value,
const deque<string>& operand_list,
Expand All @@ -101,7 +101,7 @@ namespace py_rocks {
logger);
}

bool PartialMerge (
virtual bool PartialMerge (
const Slice& key,
const Slice& left_operand,
const Slice& right_operand,
Expand All @@ -117,7 +117,7 @@ namespace py_rocks {
logger);
}

const char* Name() const {
virtual const char* Name() const {
return this->name.c_str();
}

Expand Down
8 changes: 4 additions & 4 deletions rocksdb/cpp/slice_transform_wrapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ namespace py_rocks {
in_range_callback(in_range_callback)
{}

const char* Name() const {
virtual const char* Name() const {
return this->name.c_str();
}

Slice Transform(const Slice& src) const {
virtual Slice Transform(const Slice& src) const {
string error_msg;
Slice val;

Expand All @@ -62,7 +62,7 @@ namespace py_rocks {
return val;
}

bool InDomain(const Slice& src) const {
virtual bool InDomain(const Slice& src) const {
string error_msg;
bool val;

Expand All @@ -78,7 +78,7 @@ namespace py_rocks {
return val;
}

bool InRange(const Slice& dst) const {
virtual bool InRange(const Slice& dst) const {
string error_msg;
bool val;

Expand Down

0 comments on commit 98301a8

Please sign in to comment.