diff --git a/include/boost/unordered/detail/equivalent.hpp b/include/boost/unordered/detail/equivalent.hpp index 16fc1f10..4a482734 100644 --- a/include/boost/unordered/detail/equivalent.hpp +++ b/include/boost/unordered/detail/equivalent.hpp @@ -259,10 +259,10 @@ namespace boost { namespace unordered { namespace detail { for(iterator n1(this->begin()); n1.node_;) { - iterator n2(other.find_matching_node(n1)); - if (!n2.node_) return false; - iterator end1(next_group(n1.node_)); - iterator end2(next_group(n2.node_)); + node_pointer n2 = other.find_node(other.get_key(n1->value())); + if (!n2) return false; + node_pointer end1 = next_group(n1); + node_pointer end2 = next_group(n2); if (!group_equals(n1, end1, n2, end2)) return false; n1 = end1; } diff --git a/include/boost/unordered/detail/table.hpp b/include/boost/unordered/detail/table.hpp index 10e03cb8..438feab7 100644 --- a/include/boost/unordered/detail/table.hpp +++ b/include/boost/unordered/detail/table.hpp @@ -728,17 +728,6 @@ namespace boost { namespace unordered { namespace detail { find_node_impl(hash(k), k, this->key_eq()); } - node_pointer find_matching_node(iterator n) const - { - // TODO: Does this apply to C++11? - // - // For some stupid reason, I decided to support equality comparison - // when different hash functions are used. So I can't use the hash - // value from the node here. - - return find_node(get_key(*n)); - } - // Reserve and rehash void reserve_for_insert(std::size_t); diff --git a/include/boost/unordered/detail/unique.hpp b/include/boost/unordered/detail/unique.hpp index 52fd3cde..0e5771e2 100644 --- a/include/boost/unordered/detail/unique.hpp +++ b/include/boost/unordered/detail/unique.hpp @@ -254,7 +254,7 @@ namespace boost { namespace unordered { namespace detail { for(iterator n1(this->begin()); n1.node_; ++n1) { - node_pointer n2 = other.find_matching_node(n1); + node_pointer n2 = other.find_node(other.get_key(n1->value())); if (!n2 || *n1 != n2->value()) return false;