diff --git a/dbms/src/Common/HashTable/FixedHashTable.h b/dbms/src/Common/HashTable/FixedHashTable.h index 0c3a2c1237a..2deeb40ac91 100644 --- a/dbms/src/Common/HashTable/FixedHashTable.h +++ b/dbms/src/Common/HashTable/FixedHashTable.h @@ -262,8 +262,8 @@ public: iterator end() { return iterator(this, buf + BUFFER_SIZE); } -protected: - void ALWAYS_INLINE emplaceImpl(Key x, iterator & it, bool & inserted) +public: + void ALWAYS_INLINE emplace(Key x, iterator & it, bool & inserted, size_t /* hash */ = 0) { it = iterator(this, &buf[x]); @@ -278,22 +278,16 @@ protected: ++m_size; } - -public: std::pair ALWAYS_INLINE insert(const value_type & x) { std::pair res; - emplaceImpl(Cell::getKey(x), res.first, res.second); + emplace(Cell::getKey(x), res.first, res.second); if (res.second) res.first.ptr->setMapped(x); return res; } - - void ALWAYS_INLINE emplace(Key x, iterator & it, bool & inserted) { emplaceImpl(x, it, inserted); } - void ALWAYS_INLINE emplace(Key x, iterator & it, bool & inserted, size_t) { emplaceImpl(x, it, inserted); } - iterator ALWAYS_INLINE find(Key x) { return !buf[x].isZero(*this) ? iterator(this, &buf[x]) : end();