From cc5c6fe3ad642394bdf64983ee1e3367c896cd4c Mon Sep 17 00:00:00 2001 From: CedricMocquillon Date: Sun, 13 Dec 2020 19:03:04 +0100 Subject: [PATCH] Use data() method --- components/crashcatcher/windows_crashcatcher.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/crashcatcher/windows_crashcatcher.cpp b/components/crashcatcher/windows_crashcatcher.cpp index dc10f4dcb5..4c3dfa8f63 100644 --- a/components/crashcatcher/windows_crashcatcher.cpp +++ b/components/crashcatcher/windows_crashcatcher.cpp @@ -130,7 +130,7 @@ namespace Crash DWORD copied = 0; do { executablePath.resize(executablePath.size() + MAX_PATH); - copied = GetModuleFileNameW(nullptr, &executablePath[0], executablePath.size()); + copied = GetModuleFileNameW(nullptr, executablePath.data(), executablePath.size()); } while (copied >= executablePath.size()); executablePath.resize(copied); @@ -157,7 +157,7 @@ namespace Crash PROCESS_INFORMATION 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"); waitMonitor();