From 7bc2470a83b8d8cfa8616b77934fd4a18a0a7063 Mon Sep 17 00:00:00 2001 From: weisj <31143295+weisJ@users.noreply.github.com> Date: Tue, 18 May 2021 00:00:17 +0200 Subject: [PATCH] Windows-Native: Initialize all struct members with a default value on construction. --- windows/src/main/cpp/Decorations.cpp | 2 +- windows/src/main/cpp/ThemeInfo.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/windows/src/main/cpp/Decorations.cpp b/windows/src/main/cpp/Decorations.cpp index 417dd768..78e905df 100644 --- a/windows/src/main/cpp/Decorations.cpp +++ b/windows/src/main/cpp/Decorations.cpp @@ -154,7 +154,7 @@ void UpdateRegion(WindowWrapper *wrapper) { // Avoid unnecessarily updating the region to avoid unnecessary redraws if (EqualRect(&wrapper->rgn, &old_rgn)) return; // Treat empty regions as NULL regions - RECT empty = { 0 }; + RECT empty = { 0, 0, 0, 0 }; if (EqualRect(&wrapper->rgn, &empty)) SetWindowRgn(wrapper->window, NULL, TRUE); else SetWindowRgn(wrapper->window, CreateRectRgnIndirect(&wrapper->rgn), TRUE); } diff --git a/windows/src/main/cpp/ThemeInfo.cpp b/windows/src/main/cpp/ThemeInfo.cpp index 755f4bbe..c349f661 100644 --- a/windows/src/main/cpp/ThemeInfo.cpp +++ b/windows/src/main/cpp/ThemeInfo.cpp @@ -85,7 +85,7 @@ std::string RegGetString(HKEY hKey, const LPCSTR subKey, const LPCSTR value) { } bool IsHighContrastMode() { - HIGHCONTRAST info = { 0 }; + HIGHCONTRAST info = { 0, 0, 0 }; info.cbSize = sizeof(HIGHCONTRAST); BOOL ok = SystemParametersInfo(SPI_GETHIGHCONTRAST, 0, &info, 0); if (ok) {