chore: Use default init instead of ctor init Windows watchdog

This commit is contained in:
Nick Bolton
2025-03-03 11:53:24 +00:00
parent cd5ba1382d
commit 84194cf5ef
2 changed files with 9 additions and 16 deletions

View File

@ -26,14 +26,7 @@
const auto kStartDelaySeconds = 1;
const auto kOutputBufferSize = 4096;
MSWindowsWatchdog::MSWindowsWatchdog(bool foreground)
: m_thread(nullptr),
m_outputWritePipe(nullptr),
m_outputReadPipe(nullptr),
m_elevateProcess(false),
m_startFailures(0),
m_fileLogOutputter(nullptr),
m_foreground(foreground)
MSWindowsWatchdog::MSWindowsWatchdog(bool foreground) : m_foreground(foreground)
{
initSasFunc();
initOutputReadPipe();

View File

@ -68,15 +68,15 @@ private:
static std::string processStateToString(ProcessState state);
private:
Thread *m_thread;
bool m_running;
HANDLE m_outputWritePipe;
HANDLE m_outputReadPipe;
Thread *m_outputThread;
bool m_elevateProcess;
Thread *m_thread = nullptr;
bool m_running = true;
HANDLE m_outputWritePipe = nullptr;
HANDLE m_outputReadPipe = nullptr;
Thread *m_outputThread = nullptr;
bool m_elevateProcess = false;
MSWindowsSession m_session;
int m_startFailures;
FileLogOutputter *m_fileLogOutputter;
int m_startFailures = 0;
FileLogOutputter *m_fileLogOutputter = nullptr;
bool m_foreground;
std::string m_activeDesktop;
std::unique_ptr<deskflow::platform::MSWindowsProcess> m_process;