Skip to content

Commit bdaf588

Browse files
StableAgOHbenman64
authored andcommitted
Fix construction of std::string
1 parent d0437a6 commit bdaf588

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/cpp/subprocess/utf8_to_utf16.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ namespace subprocess {
118118
int r = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS,
119119
string.c_str(), size, NULL, 0);
120120
if (r == 0) {
121-
return std::u16string();
121+
return {};
122122
}
123123
assert(r > 0);
124124

@@ -157,7 +157,7 @@ namespace subprocess {
157157
(wchar_t*)wstring.c_str(), size, NULL, 0, NULL, NULL);
158158

159159
if (r == 0) {
160-
return "";
160+
return {};
161161
}
162162
assert(r > 0);
163163

@@ -191,7 +191,7 @@ namespace subprocess {
191191
(wchar_t*)wstring.c_str(), size, NULL, 0, NULL, NULL);
192192

193193
if (r == 0) {
194-
return "";
194+
return {};
195195
}
196196
assert(r > 0);
197197

0 commit comments

Comments
 (0)