Chromium Code Reviews| Index: base/strings/string16.h |
| diff --git a/base/strings/string16.h b/base/strings/string16.h |
| index a2bd527008f4047ebc70910e167b3ba57bca276c..4bc329d35c0645ae2dcfcee4e9bb014388c301d8 100644 |
| --- a/base/strings/string16.h |
| +++ b/base/strings/string16.h |
| @@ -12,28 +12,16 @@ |
| #include "build/build_config.h" |
| -#if defined(WCHAR_T_IS_UTF16) |
| - |
| namespace base { |
| +#if defined(WCHAR_T_IS_UTF16) |
| typedef wchar_t char16; |
| typedef std::wstring string16; |
|
Mark Mentovai
2014/12/16 18:34:07
This is better. The one thing I can think of to im
scottmg
2014/12/16 18:56:39
Done.
|
| typedef std::char_traits<wchar_t> string16_char_traits; |
| - |
| -} // namespace base |
| - |
| #elif defined(WCHAR_T_IS_UTF32) |
| - |
| -namespace base { |
| - |
| typedef uint16_t char16; |
| - |
| -} // namespace base |
| - |
| #endif // WCHAR_T_IS_UTF32 |
| -namespace base { |
| - |
| int c16memcmp(const char16* s1, const char16* s2, size_t n); |
| size_t c16len(const char16* s); |
| const char16* c16memchr(const char16* s, char16 c, size_t n); |
| @@ -41,12 +29,8 @@ char16* c16memmove(char16* s1, const char16* s2, size_t n); |
| char16* c16memcpy(char16* s1, const char16* s2, size_t n); |
| char16* c16memset(char16* s, char16 c, size_t n); |
| -} // namespace base |
| - |
| #if defined(WCHAR_T_IS_UTF32) |
| -namespace base { |
| - |
| struct string16_char_traits { |
| typedef char16 char_type; |
| typedef int int_type; |
| @@ -118,11 +102,13 @@ typedef std::basic_string<char16, base::string16_char_traits> string16; |
| extern std::ostream& operator<<(std::ostream& out, const string16& str); |
| +#endif // WCHAR_T_IS_UTF32 |
| + |
| } // namespace base |
| +#if defined(WCHAR_T_IS_UTF32) |
| extern template class std::basic_string<base::char16, |
| base::string16_char_traits>; |
| - |
| #endif // WCHAR_T_IS_UTF32 |
| #endif // MINI_CHROMIUM_BASE_STRINGS_STRING16_H_ |