OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. |
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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 return m_impl.add(std::forward<IncomingValueType>(value)); | 251 return m_impl.add(std::forward<IncomingValueType>(value)); |
252 } | 252 } |
253 | 253 |
254 template <typename Value, | 254 template <typename Value, |
255 typename HashFunctions, | 255 typename HashFunctions, |
256 typename Traits, | 256 typename Traits, |
257 typename Allocator> | 257 typename Allocator> |
258 template <typename HashTranslator, typename T> | 258 template <typename HashTranslator, typename T> |
259 inline typename HashSet<Value, HashFunctions, Traits, Allocator>::AddResult | 259 inline typename HashSet<Value, HashFunctions, Traits, Allocator>::AddResult |
260 HashSet<Value, HashFunctions, Traits, Allocator>::addWithTranslator(T&& value) { | 260 HashSet<Value, HashFunctions, Traits, Allocator>::addWithTranslator(T&& value) { |
261 // Forward only the first argument, because the second argument isn't actually
used in HashSetTranslatorAdapter. | 261 // Forward only the first argument, because the second argument isn't actually |
| 262 // used in HashSetTranslatorAdapter. |
262 return m_impl | 263 return m_impl |
263 .template addPassingHashCode<HashSetTranslatorAdapter<HashTranslator>>( | 264 .template addPassingHashCode<HashSetTranslatorAdapter<HashTranslator>>( |
264 std::forward<T>(value), value); | 265 std::forward<T>(value), value); |
265 } | 266 } |
266 | 267 |
267 template <typename T, typename U, typename V, typename W> | 268 template <typename T, typename U, typename V, typename W> |
268 inline void HashSet<T, U, V, W>::remove(iterator it) { | 269 inline void HashSet<T, U, V, W>::remove(iterator it) { |
269 m_impl.remove(it.m_impl); | 270 m_impl.remove(it.m_impl); |
270 } | 271 } |
271 | 272 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 iterator end = collection.end(); | 315 iterator end = collection.end(); |
315 for (unsigned i = 0; it != end; ++it, ++i) | 316 for (unsigned i = 0; it != end; ++it, ++i) |
316 vector[i] = *it; | 317 vector[i] = *it; |
317 } | 318 } |
318 | 319 |
319 } // namespace WTF | 320 } // namespace WTF |
320 | 321 |
321 using WTF::HashSet; | 322 using WTF::HashSet; |
322 | 323 |
323 #endif // WTF_HashSet_h | 324 #endif // WTF_HashSet_h |
OLD | NEW |