| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CollectionsSTL_h | 5 #ifndef CollectionsSTL_h |
| 6 #define CollectionsSTL_h | 6 #define CollectionsSTL_h |
| 7 | 7 |
| 8 #include "wtf/Allocator.h" | 8 #include "wtf/Allocator.h" |
| 9 #include "wtf/HashMap.h" | 9 #include "wtf/HashMap.h" |
| 10 #include "wtf/PassOwnPtr.h" | 10 #include "wtf/PassOwnPtr.h" |
| 11 #include "wtf/text/StringHash.h" | |
| 12 | 11 |
| 13 #include <algorithm> | 12 #include <algorithm> |
| 14 #include <unordered_map> | 13 #include <unordered_map> |
| 15 #include <vector> | 14 #include <vector> |
| 16 | 15 |
| 17 namespace std { | 16 namespace std { |
| 18 template<> | 17 template<> |
| 19 struct hash<String> { | 18 struct hash<String> { |
| 20 std::size_t operator()(const String& k) const { return StringHash::hash(k);
} | 19 std::size_t operator()(const String& k) const { return StringHash::hash(k);
} |
| 21 }; | 20 }; |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 template <typename K> | 213 template <typename K> |
| 215 class HashSet : public protocol::HashMap<K, K> { | 214 class HashSet : public protocol::HashMap<K, K> { |
| 216 public: | 215 public: |
| 217 void add(const K& k) { this->set(k, k); } | 216 void add(const K& k) { this->set(k, k); } |
| 218 }; | 217 }; |
| 219 | 218 |
| 220 } // namespace platform | 219 } // namespace platform |
| 221 } // namespace blink | 220 } // namespace blink |
| 222 | 221 |
| 223 #endif // !defined(CollectionsSTL_h) | 222 #endif // !defined(CollectionsSTL_h) |
| OLD | NEW |