format according to review

This commit is contained in:
mxve 2024-04-24 17:13:37 +02:00
parent 0801553556
commit a07253fff4

View File

@ -104,20 +104,20 @@ namespace Utils
void Library::LaunchProcess(const std::wstring& process, const std::wstring& commandLine, const std::filesystem::path& currentDir)
{
STARTUPINFOW startup_info;
PROCESS_INFORMATION process_info;
STARTUPINFOW startupInfo;
PROCESS_INFORMATION processInfo;
ZeroMemory(&startup_info, sizeof(startup_info));
ZeroMemory(&process_info, sizeof(process_info));
startup_info.cb = sizeof(startup_info);
ZeroMemory(&startupInfo, sizeof(startupInfo));
ZeroMemory(&processInfo, sizeof(processInfo));
startupInfo.cb = sizeof(startupInfo);
CreateProcessW(process.data(), const_cast<wchar_t*>(commandLine.data()), nullptr,
nullptr, false, NULL, nullptr, currentDir.wstring().data(),
&startup_info, &process_info);
&startupInfo, &processInfo);
if (process_info.hThread && process_info.hThread != INVALID_HANDLE_VALUE)
CloseHandle(process_info.hThread);
if (process_info.hProcess && process_info.hProcess != INVALID_HANDLE_VALUE)
CloseHandle(process_info.hProcess);
if (processInfo.hThread && processInfo.hThread != INVALID_HANDLE_VALUE)
CloseHandle(processInfo.hThread);
if (processInfo.hProcess && processInfo.hProcess != INVALID_HANDLE_VALUE)
CloseHandle(processInfo.hProcess);
}
}