OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All rights reserv
ed. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 typedef std::nullptr_t EmptyValueType; | 165 typedef std::nullptr_t EmptyValueType; |
166 | 166 |
167 static EmptyValueType emptyValue() { return nullptr; } | 167 static EmptyValueType emptyValue() { return nullptr; } |
168 | 168 |
169 static const bool hasIsEmptyValueFunction = true; | 169 static const bool hasIsEmptyValueFunction = true; |
170 static bool isEmptyValue(const OwnPtr<P>& value) { return !value; } | 170 static bool isEmptyValue(const OwnPtr<P>& value) { return !value; } |
171 | 171 |
172 typedef typename OwnPtr<P>::PtrType PeekInType; | 172 typedef typename OwnPtr<P>::PtrType PeekInType; |
173 | 173 |
174 typedef PassOwnPtr<P> PassInType; | 174 typedef PassOwnPtr<P> PassInType; |
175 static void store(PassOwnPtr<P> value, OwnPtr<P>& storage) { storage = value
; } | 175 static void store(PassOwnPtr<P> value, OwnPtr<P>& storage) { storage = std::
move(value); } |
176 | 176 |
177 typedef PassOwnPtr<P> PassOutType; | 177 typedef PassOwnPtr<P> PassOutType; |
178 static PassOwnPtr<P> passOut(OwnPtr<P>& value) { return value.release(); } | 178 static PassOwnPtr<P> passOut(OwnPtr<P>& value) { return value.release(); } |
179 static PassOwnPtr<P> passOut(std::nullptr_t) { return nullptr; } | 179 static PassOwnPtr<P> passOut(std::nullptr_t) { return nullptr; } |
180 | 180 |
181 typedef typename OwnPtr<P>::PtrType PeekOutType; | 181 typedef typename OwnPtr<P>::PtrType PeekOutType; |
182 static PeekOutType peek(const OwnPtr<P>& value) { return value.get(); } | 182 static PeekOutType peek(const OwnPtr<P>& value) { return value.get(); } |
183 static PeekOutType peek(std::nullptr_t) { return 0; } | 183 static PeekOutType peek(std::nullptr_t) { return 0; } |
184 }; | 184 }; |
185 | 185 |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 struct TraceInCollectionTrait; | 367 struct TraceInCollectionTrait; |
368 | 368 |
369 } // namespace WTF | 369 } // namespace WTF |
370 | 370 |
371 using WTF::HashTraits; | 371 using WTF::HashTraits; |
372 using WTF::PairHashTraits; | 372 using WTF::PairHashTraits; |
373 using WTF::NullableHashTraits; | 373 using WTF::NullableHashTraits; |
374 using WTF::SimpleClassHashTraits; | 374 using WTF::SimpleClassHashTraits; |
375 | 375 |
376 #endif // WTF_HashTraits_h | 376 #endif // WTF_HashTraits_h |
OLD | NEW |