Commit d9e025eb authored by yutak's avatar yutak Committed by Commit bot

WTF::HashTraits: Remove unnecessary Peek() functions.

Peek() always takes a reference to an existing slot in a table. Therefore,
Peek() does not take a nullptr_t value, since nullptr_t is not stored in
the backing buffer.

BUG=715430
R=tzik@chromium.org

Review-Url: https://codereview.chromium.org/2844583004
Cr-Commit-Position: refs/heads/master@{#467920}
parent 7d57a8fa
......@@ -223,7 +223,6 @@ struct HashTraits<RefPtr<P>> : SimpleClassHashTraits<RefPtr<P>> {
typedef P* PeekOutType;
static PeekOutType Peek(const RefPtr<P>& value) { return value.Get(); }
static PeekOutType Peek(std::nullptr_t) { return 0; }
};
template <typename T>
......@@ -245,7 +244,6 @@ struct HashTraits<std::unique_ptr<T>>
static PeekOutType Peek(const std::unique_ptr<T>& value) {
return value.get();
}
static PeekOutType Peek(std::nullptr_t) { return nullptr; }
static void ConstructDeletedValue(std::unique_ptr<T>& slot, bool) {
// Dirty trick: implant an invalid pointer to unique_ptr. Destructor isn't
......
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