Skip to content

Commit f40df29

Browse files
Fix Windows build errors introduced in #10498
Fixes #12386
1 parent 5dc00f6 commit f40df29

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/qt/bitcoin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ int main(int argc, char *argv[])
706706
if (BitcoinCore::baseInitialize()) {
707707
app.requestInitialize();
708708
#if defined(Q_OS_WIN) && QT_VERSION >= 0x050000
709-
WinShutdownMonitor::registerShutdownBlockReason(QObject::tr("%1 didn't yet exit safely...").arg(QObject::tr(PACKAGE_NAME)), static_cast<HWND>(app.getMainWinId()));
709+
WinShutdownMonitor::registerShutdownBlockReason(QObject::tr("%1 didn't yet exit safely...").arg(QObject::tr(PACKAGE_NAME)), (HWND)app.getMainWinId());
710710
#endif
711711
app.exec();
712712
app.requestShutdown();

src/qt/winshutdownmonitor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ bool WinShutdownMonitor::nativeEventFilter(const QByteArray &eventType, void *pM
5656
void WinShutdownMonitor::registerShutdownBlockReason(const QString& strReason, const HWND& mainWinId)
5757
{
5858
typedef BOOL (WINAPI *PSHUTDOWNBRCREATE)(HWND, LPCWSTR);
59-
PSHUTDOWNBRCREATE shutdownBRCreate = static_cast<PSHUTDOWNBRCREATE>(GetProcAddress(GetModuleHandleA("User32.dll"), "ShutdownBlockReasonCreate"));
59+
PSHUTDOWNBRCREATE shutdownBRCreate = (PSHUTDOWNBRCREATE)GetProcAddress(GetModuleHandleA("User32.dll"), "ShutdownBlockReasonCreate");
6060
if (shutdownBRCreate == nullptr) {
6161
qWarning() << "registerShutdownBlockReason: GetProcAddress for ShutdownBlockReasonCreate failed";
6262
return;

0 commit comments

Comments
 (0)