Move ~Comparator define to comparator.h

Summary:
When I impl my own comparator, and build in release mode.
The following compile error occurs.
undefined reference to `typeinfo for rocksdb::Comparator'

This fix allows users build with RTTI off when has their own comparator.
Closes https://github.com/facebook/rocksdb/pull/3008

Differential Revision: D6077354

Pulled By: yiwu-arbug

fbshipit-source-id: 914c26dbab72f0ad1f0e15f8666a3fb2f10bfed8
main
codeeply 7 years ago committed by Facebook Github Bot
parent 8e63cad078
commit f7843f30a8
  1. 2
      include/rocksdb/comparator.h
  2. 2
      util/comparator.cc

@ -21,7 +21,7 @@ class Slice;
// from multiple threads.
class Comparator {
public:
virtual ~Comparator();
virtual ~Comparator() {}
// Three-way comparison. Returns value:
// < 0 iff "a" < "b",

@ -17,8 +17,6 @@
namespace rocksdb {
Comparator::~Comparator() { }
namespace {
class BytewiseComparatorImpl : public Comparator {
public:

Loading…
Cancel
Save