Skip to content

Commit 800078a

Browse files
authored
Merge pull request #71 from Moros1138/main
add enforcement for include order of PixelGameEngine header
2 parents 2d31b49 + 2a7b798 commit 800078a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

olcUTIL_Geometry2D.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,15 @@
192192
#include <cassert>
193193
#include <array>
194194

195+
196+
#ifdef PGE_VER
197+
#error "olcUTIL_Geometry2D.h must be included BEFORE olcPixelGameEngine.h"
198+
#else
199+
200+
#ifndef OLC_IGNORE_VEC2D
201+
#define OLC_IGNORE_VEC2D
202+
#endif
203+
195204
#ifndef OLC_V2D_TYPE
196205
#define OLC_V2D_TYPE
197206
namespace olc
@@ -2493,3 +2502,5 @@ namespace olc::utils::geom2d
24932502
return internal::filter_duplicate_points(intersections);
24942503
}
24952504
}
2505+
2506+
#endif // PGE_VER

0 commit comments

Comments
 (0)