Commit 12562866 authored by Bartek Nowierski's avatar Bartek Nowierski Committed by Commit Bot

Remove dead function HashMap::Insert

It wouldn't compile anyway, because AddPassingHashCode doesn't exist

Change-Id: I1e2b282dd1d62033b34fe769799b8c81fa9ede37
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2143873Reviewed-by: default avatarOmer Katz <omerkatz@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Bartek Nowierski <bartekn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#757823}
parent 84eb9ae2
...@@ -193,18 +193,6 @@ class HashMap { ...@@ -193,18 +193,6 @@ class HashMap {
template <typename HashTranslator, typename T> template <typename HashTranslator, typename T>
bool Contains(const T&) const; bool Contains(const T&) const;
// An alternate version of insert() that finds the object by hashing and
// comparing with some other type, to avoid the cost of type conversion if
// the object is already in the table. HashTranslator must have the
// following function members:
// static unsigned hash(const T&);
// static bool equal(const ValueType&, const T&);
// static translate(ValueType&, const T&, unsigned hashCode);
template <typename HashTranslator,
typename IncomingKeyType,
typename IncomingMappedType>
AddResult Insert(IncomingKeyType&&, IncomingMappedType&&);
template <typename IncomingKeyType> template <typename IncomingKeyType>
static bool IsValidKey(const IncomingKeyType&); static bool IsValidKey(const IncomingKeyType&);
...@@ -577,24 +565,6 @@ typename HashMap<T, U, V, W, X, Y>::AddResult HashMap<T, U, V, W, X, Y>::Set( ...@@ -577,24 +565,6 @@ typename HashMap<T, U, V, W, X, Y>::AddResult HashMap<T, U, V, W, X, Y>::Set(
return result; return result;
} }
template <typename T,
typename U,
typename V,
typename W,
typename X,
typename Y>
template <typename HashTranslator,
typename IncomingKeyType,
typename IncomingMappedType>
auto HashMap<T, U, V, W, X, Y>::Insert(IncomingKeyType&& key,
IncomingMappedType&& mapped)
-> AddResult {
return impl_.template AddPassingHashCode<
HashMapTranslatorAdapter<ValueTraits, HashTranslator>>(
std::forward<IncomingKeyType>(key),
std::forward<IncomingMappedType>(mapped));
}
template <typename T, template <typename T,
typename U, typename U,
typename V, typename V,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment