1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-03-03 20:09:40 +00:00

Use data() method

This commit is contained in:
CedricMocquillon 2020-12-13 19:03:04 +01:00
parent 112437cf28
commit cc5c6fe3ad

View file

@ -130,7 +130,7 @@ namespace Crash
DWORD copied = 0; DWORD copied = 0;
do { do {
executablePath.resize(executablePath.size() + MAX_PATH); executablePath.resize(executablePath.size() + MAX_PATH);
copied = GetModuleFileNameW(nullptr, &executablePath[0], executablePath.size()); copied = GetModuleFileNameW(nullptr, executablePath.data(), executablePath.size());
} while (copied >= executablePath.size()); } while (copied >= executablePath.size());
executablePath.resize(copied); executablePath.resize(copied);
@ -157,7 +157,7 @@ namespace Crash
PROCESS_INFORMATION pi; PROCESS_INFORMATION pi;
ZeroMemory(&pi, sizeof(pi)); ZeroMemory(&pi, sizeof(pi));
if (!CreateProcessW(&executablePath[0], &arguments[0], NULL, NULL, TRUE, 0, NULL, NULL, &si, &pi)) if (!CreateProcessW(executablePath.data(), arguments.data(), NULL, NULL, TRUE, 0, NULL, NULL, &si, &pi))
throw std::runtime_error("Could not start crash monitor process"); throw std::runtime_error("Could not start crash monitor process");
waitMonitor(); waitMonitor();