refactor: remove unused ArchMiscWindows::s_dialog, ArchMiscWindows::cleanup

This commit is contained in:
sithlord48 2025-03-22 19:22:17 -04:00 committed by Nick Bolton
parent 9df2a2c28d
commit 9530b9c6ba
3 changed files with 0 additions and 22 deletions

View file

@ -30,9 +30,6 @@ Arch::Arch(Arch *arch)
Arch::~Arch() Arch::~Arch()
{ {
#if SYSAPI_WIN32
ArchMiscWindows::cleanup();
#endif
} }
void Arch::init() void Arch::init()

View file

@ -51,24 +51,16 @@ const std::string s_binaryName = getBinaryName();
// ArchMiscWindows // ArchMiscWindows
// //
ArchMiscWindows::Dialogs *ArchMiscWindows::s_dialogs = NULL;
DWORD ArchMiscWindows::s_busyState = 0; DWORD ArchMiscWindows::s_busyState = 0;
ArchMiscWindows::STES_t ArchMiscWindows::s_stes = NULL; ArchMiscWindows::STES_t ArchMiscWindows::s_stes = NULL;
HICON ArchMiscWindows::s_largeIcon = NULL; HICON ArchMiscWindows::s_largeIcon = NULL;
HICON ArchMiscWindows::s_smallIcon = NULL; HICON ArchMiscWindows::s_smallIcon = NULL;
HINSTANCE ArchMiscWindows::s_instanceWin32 = NULL; HINSTANCE ArchMiscWindows::s_instanceWin32 = NULL;
void ArchMiscWindows::cleanup()
{
delete s_dialogs;
}
void ArchMiscWindows::init() void ArchMiscWindows::init()
{ {
// stop windows system error dialogs from showing. // stop windows system error dialogs from showing.
SetErrorMode(SEM_FAILCRITICALERRORS); SetErrorMode(SEM_FAILCRITICALERRORS);
s_dialogs = new Dialogs;
} }
int ArchMiscWindows::runDaemon(RunFunc runFunc) int ArchMiscWindows::runDaemon(RunFunc runFunc)
@ -258,11 +250,6 @@ ArchMiscWindows::readValueInt(HKEY key, const TCHAR *name)
bool ArchMiscWindows::processDialog(MSG *msg) bool ArchMiscWindows::processDialog(MSG *msg)
{ {
for (Dialogs::const_iterator index = s_dialogs->begin(); index != s_dialogs->end(); ++index) {
if (IsDialogMessage(*index, msg)) {
return true;
}
}
return false; return false;
} }

View file

@ -7,7 +7,6 @@
#pragma once #pragma once
#include <set>
#include <string> #include <string>
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
@ -41,9 +40,6 @@ public:
//! Initialize //! Initialize
static void init(); static void init();
//! Delete memory
static void cleanup();
//! Run the daemon //! Run the daemon
/*! /*!
Delegates to ArchDaemonWindows. Delegates to ArchDaemonWindows.
@ -173,10 +169,8 @@ private:
static HMODULE findLoadedModule(std::array<const char *, 2> moduleNames); static HMODULE findLoadedModule(std::array<const char *, 2> moduleNames);
private: private:
using Dialogs = std::set<HWND>;
typedef DWORD(WINAPI *STES_t)(DWORD); typedef DWORD(WINAPI *STES_t)(DWORD);
static Dialogs *s_dialogs;
static DWORD s_busyState; static DWORD s_busyState;
static STES_t s_stes; // STES: Set thread execution state static STES_t s_stes; // STES: Set thread execution state
static HICON s_largeIcon; static HICON s_largeIcon;