Skip to content

Commit

Permalink
[win] Separate #includes to avoid changing its order w/clang-format
Browse files Browse the repository at this point in the history
In these cases #include <windows.h> must go first to avoid compilation
errors on MSVC.
  • Loading branch information
dacap committed Dec 12, 2024
1 parent 151733f commit 3a16b2d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions base/memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ char* base_strdup(const char* string)

#ifdef _MSC_VER
#include <windows.h>

#include <dbghelp.h>

typedef USHORT (WINAPI* RtlCaptureStackBackTraceType)(ULONG, ULONG, PVOID*, PULONG);
Expand Down
1 change: 1 addition & 0 deletions base/memory_dump_win32.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#if LAF_WINDOWS
#include <windows.h>

#include <dbghelp.h>
#endif

Expand Down
1 change: 1 addition & 0 deletions os/skia/skia_window_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#if SK_SUPPORT_GPU
#if LAF_WINDOWS
#include <windows.h>

#include <GL/gl.h>
#elif LAF_MACOS
#include <OpenGL/gl.h>
Expand Down
1 change: 1 addition & 0 deletions os/win/wintab.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <string>

#include <windows.h>

#include "third_party/wacom/wintab.h"

#define PACKETDATA (PK_CURSOR | PK_BUTTONS | PK_X | PK_Y | PK_NORMAL_PRESSURE)
Expand Down

0 comments on commit 3a16b2d

Please sign in to comment.