| 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 String16STL_h | 5 #ifndef String16STL_h |
| 6 #define String16STL_h | 6 #define String16STL_h |
| 7 | 7 |
| 8 #include <cstdlib> | 8 #include <cstdlib> |
| 9 #include <cstring> | 9 #include <cstring> |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 // compile! | 236 // compile! |
| 237 // TODO(eostroukhov): Eradicate | 237 // TODO(eostroukhov): Eradicate |
| 238 class String { | 238 class String { |
| 239 public: | 239 public: |
| 240 String() {}; | 240 String() {}; |
| 241 String(const String16& other) {}; | 241 String(const String16& other) {}; |
| 242 operator String16() const { return String16(); }; | 242 operator String16() const { return String16(); }; |
| 243 }; | 243 }; |
| 244 } // namespace WTF | 244 } // namespace WTF |
| 245 | 245 |
| 246 |
| 247 namespace std { |
| 248 template<> struct hash<String16> { |
| 249 std::size_t operator()(const String16& string) const |
| 250 { |
| 251 return string.hash(); |
| 252 } |
| 253 }; |
| 254 |
| 255 } // namespace std |
| 256 |
| 246 using String = WTF::String; | 257 using String = WTF::String; |
| 247 | 258 |
| 248 #endif // !defined(String16STL_h) | 259 #endif // !defined(String16STL_h) |
| OLD | NEW |