| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 } | 129 } |
| 130 return hash_code; | 130 return hash_code; |
| 131 } | 131 } |
| 132 | 132 |
| 133 private: | 133 private: |
| 134 static std::string intToString(int); | 134 static std::string intToString(int); |
| 135 static std::string doubleToString(double); | 135 static std::string doubleToString(double); |
| 136 // presubmit: allow wstring | 136 // presubmit: allow wstring |
| 137 wstring m_impl; | 137 wstring m_impl; |
| 138 mutable bool has_hash = false; | 138 mutable bool has_hash = false; |
| 139 mutable std::size_t hash_code; | 139 mutable std::size_t hash_code = 0; |
| 140 }; | 140 }; |
| 141 | 141 |
| 142 static inline bool isSpaceOrNewline(UChar c) | 142 static inline bool isSpaceOrNewline(UChar c) |
| 143 { | 143 { |
| 144 return false; | 144 return false; |
| 145 } | 145 } |
| 146 | 146 |
| 147 class String16Builder { | 147 class String16Builder { |
| 148 public: | 148 public: |
| 149 String16Builder() { } | 149 String16Builder() { } |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 public: | 234 public: |
| 235 String() {}; | 235 String() {}; |
| 236 String(const String16& other) {}; | 236 String(const String16& other) {}; |
| 237 operator String16() const { return String16(); }; | 237 operator String16() const { return String16(); }; |
| 238 }; | 238 }; |
| 239 } // namespace WTF | 239 } // namespace WTF |
| 240 | 240 |
| 241 using String = WTF::String; | 241 using String = WTF::String; |
| 242 | 242 |
| 243 #endif // !defined(String16STL_h) | 243 #endif // !defined(String16STL_h) |
| OLD | NEW |