Fix MSVC warning C26477

Relating to C++ Core Guidelines es.47.
This commit is contained in:
Oliver Hamlet
2022-02-07 20:25:16 +00:00
parent 400f80d215
commit b165649285
+5 -5
View File
@@ -167,10 +167,10 @@ std::string FromWinWide(const std::wstring& wstr) {
0,
wstr.c_str(),
narrow(wstr.length()),
NULL,
nullptr,
0,
NULL,
NULL);
nullptr,
nullptr);
if (len == 0) {
return std::string();
@@ -183,8 +183,8 @@ std::string FromWinWide(const std::wstring& wstr) {
narrow(wstr.length()),
str.data(),
narrow(str.length()),
NULL,
NULL);
nullptr,
nullptr);
return str;
}
#endif