Index: third_party/WebKit/Source/wtf/Vector.h |
diff --git a/third_party/WebKit/Source/wtf/Vector.h b/third_party/WebKit/Source/wtf/Vector.h |
index 5b50284b29f3c98f244e66884144907583cd4659..9722d7eaf906fa9b3ba5615311f2c6ea71f8c43c 100644 |
--- a/third_party/WebKit/Source/wtf/Vector.h |
+++ b/third_party/WebKit/Source/wtf/Vector.h |
@@ -271,26 +271,6 @@ struct VectorComparer<true, T> { |
}; |
template <typename T> |
-struct VectorElementComparer { |
- STATIC_ONLY(VectorElementComparer); |
- template <typename U> |
- static bool compareElement(const T& left, const U& right) |
- { |
- return left == right; |
- } |
-}; |
- |
-template <typename T> |
-struct VectorElementComparer<std::unique_ptr<T>> { |
- STATIC_ONLY(VectorElementComparer); |
- template <typename U> |
- static bool compareElement(const std::unique_ptr<T>& left, const U& right) |
- { |
- return left.get() == right; |
- } |
-}; |
- |
-template <typename T> |
struct VectorTypeOperations { |
STATIC_ONLY(VectorTypeOperations); |
static void destruct(T* begin, T* end) |
@@ -332,12 +312,6 @@ struct VectorTypeOperations { |
{ |
return VectorComparer<VectorTraits<T>::canCompareWithMemcmp, T>::compare(a, b, size); |
} |
- |
- template <typename U> |
- static bool compareElement(const T& left, U&& right) |
- { |
- return VectorElementComparer<T>::compareElement(left, std::forward<U>(right)); |
- } |
}; |
template <typename T, bool hasInlineCapacity, typename Allocator> |
@@ -1121,7 +1095,7 @@ size_t Vector<T, inlineCapacity, Allocator>::find(const U& value) const |
const T* b = begin(); |
const T* e = end(); |
for (const T* iter = b; iter < e; ++iter) { |
- if (TypeOperations::compareElement(*iter, value)) |
+ if (*iter == value) |
return iter - b; |
} |
return kNotFound; |
@@ -1135,7 +1109,7 @@ size_t Vector<T, inlineCapacity, Allocator>::reverseFind(const U& value) const |
const T* iter = end(); |
while (iter > b) { |
--iter; |
- if (TypeOperations::compareElement(*iter, value)) |
+ if (*iter == value) |
return iter - b; |
} |
return kNotFound; |