diff --git a/src/platform/windows/clipboard_windows.cpp b/src/platform/windows/clipboard_windows.cpp index bdf1187..de4fedb 100644 --- a/src/platform/windows/clipboard_windows.cpp +++ b/src/platform/windows/clipboard_windows.cpp @@ -1,14 +1,18 @@ #ifndef NOMINMAX #define NOMINMAX #endif +// clang-format off // Windows headers must precede GDI+ and shell declarations. #include - +#include +// gdiplus.h spells min / max unqualified and breaks under NOMINMAX without these. +using std::max; +using std::min; #include #include #include +// clang-format on -#include #include #include #include diff --git a/src/platform/windows/drag_source_windows.cpp b/src/platform/windows/drag_source_windows.cpp index c8fe71f..f28d7a6 100644 --- a/src/platform/windows/drag_source_windows.cpp +++ b/src/platform/windows/drag_source_windows.cpp @@ -3,8 +3,12 @@ #include #include #include -// clang-format on +#include +// gdiplus.h spells min / max unqualified and breaks under NOMINMAX without these. +using std::max; +using std::min; #include +// clang-format on #include #include diff --git a/src/platform/windows/image_windows.cpp b/src/platform/windows/image_windows.cpp index 0c681f7..bf133fa 100644 --- a/src/platform/windows/image_windows.cpp +++ b/src/platform/windows/image_windows.cpp @@ -1,6 +1,12 @@ +// clang-format off +#include #include +#include +// gdiplus.h spells min / max unqualified and breaks under NOMINMAX without these. +using std::max; +using std::min; #include -#include +// clang-format on #include #include #include diff --git a/src/platform/windows/menu_winui3_windows.cpp b/src/platform/windows/menu_winui3_windows.cpp index 2f635e1..f4d5cc0 100644 --- a/src/platform/windows/menu_winui3_windows.cpp +++ b/src/platform/windows/menu_winui3_windows.cpp @@ -3,7 +3,13 @@ #include "winui3_runtime_windows.h" #undef GetCurrentTime +// clang-format off +#include +// gdiplus.h spells min / max unqualified and breaks under NOMINMAX without these. +using std::max; +using std::min; #include +// clang-format on #include #include #include diff --git a/src/platform/windows/window_taskbar_windows.cpp b/src/platform/windows/window_taskbar_windows.cpp index fbfbbed..b77327a 100644 --- a/src/platform/windows/window_taskbar_windows.cpp +++ b/src/platform/windows/window_taskbar_windows.cpp @@ -2,11 +2,14 @@ #include #include #include +#include +// gdiplus.h spells min / max unqualified and breaks under NOMINMAX without these. +using std::max; +using std::min; #include #include // clang-format on -#include #include #include #include