aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/stubs/io_win32.cc
diff options
context:
space:
mode:
authorGravatar Jisi Liu <jisi.liu@gmail.com>2017-08-21 14:21:00 -0700
committerGravatar Jisi Liu <jisi.liu@gmail.com>2017-08-21 14:21:00 -0700
commit77a453a57f065bfd059f2d039ec3883f8ce726a6 (patch)
tree8d9b15c844e12c4a8c5627e460e92b5d5cef7390 /src/google/protobuf/stubs/io_win32.cc
parent4aadcd3c7bf69c5c2c904ef73fef14a723dc4866 (diff)
Fix compile errors
Diffstat (limited to 'src/google/protobuf/stubs/io_win32.cc')
-rw-r--r--src/google/protobuf/stubs/io_win32.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/google/protobuf/stubs/io_win32.cc b/src/google/protobuf/stubs/io_win32.cc
index 0eda8409..51656a78 100644
--- a/src/google/protobuf/stubs/io_win32.cc
+++ b/src/google/protobuf/stubs/io_win32.cc
@@ -212,15 +212,15 @@ string normalize(string path) {
WCHAR* as_wstring(const string& s) {
int len = ::MultiByteToWideChar(CP_UTF8, 0, s.c_str(), s.size(), NULL, 0);
WCHAR* result = new WCHAR[len + 1];
- ::MultiByteToWideChar(CP_UTF8, 0, s.c_str(), s.size(), result.get(), len + 1);
+ ::MultiByteToWideChar(CP_UTF8, 0, s.c_str(), s.size(), result, len + 1);
result[len] = 0;
return result;
}
void as_wchar_path(const string& path, wstring* wchar_path) {
scoped_array<WCHAR> wbuf(as_wstring(path));
- replace_directory_separators(wbuf);
- wchar_path->assign(wbuf);
+ replace_directory_separators(wbuf.get());
+ wchar_path->assign(wbuf.get());
}
bool as_windows_path(const string& path, wstring* result) {