From f7843f30a8af07bc2d817830dba7b350f392b257 Mon Sep 17 00:00:00 2001 From: codeeply Date: Tue, 17 Oct 2017 09:50:16 -0700 Subject: [PATCH] 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 --- include/rocksdb/comparator.h | 2 +- util/comparator.cc | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/include/rocksdb/comparator.h b/include/rocksdb/comparator.h index 64db73a72..6479a28bc 100644 --- a/include/rocksdb/comparator.h +++ b/include/rocksdb/comparator.h @@ -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", diff --git a/util/comparator.cc b/util/comparator.cc index f3148f754..274b9080a 100644 --- a/util/comparator.cc +++ b/util/comparator.cc @@ -17,8 +17,6 @@ namespace rocksdb { -Comparator::~Comparator() { } - namespace { class BytewiseComparatorImpl : public Comparator { public: -- GitLab