From d13701900a71240fe1b4074b778133ba9a3461e9 Mon Sep 17 00:00:00 2001 From: "mmentovai@google.com" Date: Wed, 27 Aug 2008 20:57:35 +0000 Subject: Move std::string16 to base::string16. Don't pollute the std namespace. Don't assume that all string types can be represented as std::basic_string. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1464 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/glue/glue_util.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'webkit/glue/glue_util.cc') diff --git a/webkit/glue/glue_util.cc b/webkit/glue/glue_util.cc index da61bd2..e2d40f6 100644 --- a/webkit/glue/glue_util.cc +++ b/webkit/glue/glue_util.cc @@ -34,15 +34,15 @@ std::wstring StringToStdWString(const WebCore::String& str) { #if defined(WCHAR_T_IS_UTF16) return std::wstring(chars ? chars : L"", str.length()); #elif defined(WCHAR_T_IS_UTF32) - std::string16 str16(chars ? chars : reinterpret_cast(L""), - str.length()); + string16 str16(chars ? chars : reinterpret_cast(L""), + str.length()); return UTF16ToWide(str16); #endif } -std::string16 StringToStdString16(const WebCore::String& str) { +string16 StringToString16(const WebCore::String& str) { const UChar* chars = str.characters(); - return std::string16(chars ? chars : (UChar *)L"", str.length()); + return string16(chars ? chars : (UChar *)L"", str.length()); } std::string StringToStdString(const WebCore::String& str) { @@ -57,7 +57,7 @@ WebCore::String StdWStringToString(const std::wstring& str) { #if defined(WCHAR_T_IS_UTF16) return WebCore::String(str.data(), static_cast(str.length())); #elif defined(WCHAR_T_IS_UTF32) - std::string16 str16 = WideToUTF16(str); + string16 str16 = WideToUTF16(str); return WebCore::String(str16.data(), static_cast(str16.length())); #endif } @@ -73,7 +73,7 @@ WebCore::DeprecatedString StdWStringToDeprecatedString( reinterpret_cast(str.c_str()), static_cast(str.size())); #elif defined(WCHAR_T_IS_UTF32) - std::string16 str16 = WideToUTF16(str); + string16 str16 = WideToUTF16(str); return WebCore::DeprecatedString( reinterpret_cast(str16.c_str()), static_cast(str16.size())); @@ -86,8 +86,8 @@ std::wstring DeprecatedStringToStdWString( return std::wstring(reinterpret_cast(dep.unicode()), dep.length()); #elif defined(WCHAR_T_IS_UTF32) - std::string16 str16(reinterpret_cast(dep.unicode()), - dep.length()); + string16 str16(reinterpret_cast(dep.unicode()), + dep.length()); return UTF16ToWide(str16); #endif } -- cgit v1.1