Index: webrtc/system_wrappers/include/utf_util_win.h |
diff --git a/webrtc/system_wrappers/include/utf_util_win.h b/webrtc/system_wrappers/include/utf_util_win.h |
index 0e3f2d01c60e977f6246a1d577ebe625da5098f3..730aa4649e17e225fadb622585ab74713db036b4 100644 |
--- a/webrtc/system_wrappers/include/utf_util_win.h |
+++ b/webrtc/system_wrappers/include/utf_util_win.h |
@@ -15,6 +15,8 @@ |
#ifdef WIN32 |
#include <windows.h> |
+ |
+#include <memory> |
#include <string> |
#include "webrtc/base/scoped_ptr.h" |
@@ -24,7 +26,7 @@ namespace webrtc { |
inline std::wstring ToUtf16(const char* utf8, size_t len) { |
int len16 = ::MultiByteToWideChar(CP_UTF8, 0, utf8, static_cast<int>(len), |
NULL, 0); |
- rtc::scoped_ptr<wchar_t[]> ws(new wchar_t[len16]); |
+ std::unique_ptr<wchar_t[]> ws(new wchar_t[len16]); |
::MultiByteToWideChar(CP_UTF8, 0, utf8, static_cast<int>(len), ws.get(), |
len16); |
return std::wstring(ws.get(), len16); |
@@ -37,7 +39,7 @@ inline std::wstring ToUtf16(const std::string& str) { |
inline std::string ToUtf8(const wchar_t* wide, size_t len) { |
int len8 = ::WideCharToMultiByte(CP_UTF8, 0, wide, static_cast<int>(len), |
NULL, 0, NULL, NULL); |
- rtc::scoped_ptr<char[]> ns(new char[len8]); |
+ std::unique_ptr<char[]> ns(new char[len8]); |
::WideCharToMultiByte(CP_UTF8, 0, wide, static_cast<int>(len), ns.get(), len8, |
NULL, NULL); |
return std::string(ns.get(), len8); |