diff --git a/dht/i_partitioner.cc b/dht/i_partitioner.cc index 688c411088..166ec1ea2e 100644 --- a/dht/i_partitioner.cc +++ b/dht/i_partitioner.cc @@ -112,21 +112,6 @@ static inline unsigned char get_byte(bytes_view b, size_t off) { } } -int i_partitioner::tri_compare(const token& t1, const token& t2) const { - size_t sz = std::min(t1._data.size(), t2._data.size()); - - for (size_t i = 0; i < sz; i++) { - auto b1 = get_byte(t1._data, i); - auto b2 = get_byte(t2._data, i); - if (b1 < b2) { - return -1; - } else if (b1 > b2) { - return 1; - } - } - return 0; -} - int tri_compare(const token& t1, const token& t2) { if (t1._kind == t2._kind) { return global_partitioner().tri_compare(t1, t2); diff --git a/dht/i_partitioner.hh b/dht/i_partitioner.hh index af8e9dcf53..89dde67ded 100644 --- a/dht/i_partitioner.hh +++ b/dht/i_partitioner.hh @@ -284,7 +284,7 @@ public: /** * @return < 0 if if t1's _data array is less, t2's. 0 if they are equal, and > 0 otherwise. _kind comparison should be done separately. */ - virtual int tri_compare(const token& t1, const token& t2) const; + virtual int tri_compare(const token& t1, const token& t2) const = 0; /** * @return true if t1's _data array is equal t2's. _kind comparison should be done separately. */