Skip to content

Commit 6b96037

Browse files
Treehugger RobotGerrit Code Review
authored andcommitted
Merge "Undefine 'near' and 'far' in mat4.h for host Windows" into main
2 parents 1a06751 + afdffd8 commit 6b96037

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

libs/math/include/math/mat4.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@
3434
#define CONSTEXPR
3535
#endif
3636

37+
#ifdef _WIN32
38+
// windows.h contains obsolete defines of 'near' and 'far' for systems using
39+
// legacy 16 bit pointers. Undefine them to avoid conflicting with the usage of
40+
// 'near' and 'far' in this file.
41+
#undef near
42+
#undef far
43+
#endif
44+
3745
namespace android {
3846
// -------------------------------------------------------------------------------------
3947
namespace details {

0 commit comments

Comments
 (0)