Parcourir la source

build: fix compilation on Windows by undefining the min and max macros

that WinDef.h insists on shoving down our throats.
legacy
Sam Hocevar sam il y a 12 ans
Parent
révision
1bc2a7d705
4 fichiers modifiés avec 19 ajouts et 5 suppressions
  1. +4
    -0
      src/lol/math/half.h
  2. +7
    -3
      src/lol/math/real.h
  3. +4
    -0
      src/lol/math/vector.h
  4. +4
    -2
      win32/lolcore.vcxproj.filters

+ 4
- 0
src/lol/math/half.h Voir le fichier

@@ -22,6 +22,10 @@
namespace lol
{

/* This is OUR namespace. Don't let Windows headers fuck with it. */
#undef min
#undef max

class half
{
public:


+ 7
- 3
src/lol/math/real.h Voir le fichier

@@ -18,12 +18,16 @@

#include <stdint.h>

/* Avoid issues with NaCl headers */
#undef log2

namespace lol
{

/* This is OUR namespace. Don't let Windows headers fuck with it. */
#undef min
#undef max

/* Avoid issues with NaCl headers */
#undef log2

/*
* The base class for reals. The only real reason for making this a template
* class is so we can have implicit constructors ("real x = 1" works) but


+ 4
- 0
src/lol/math/vector.h Voir le fichier

@@ -28,6 +28,10 @@
namespace lol
{

/* This is OUR namespace. Don't let Windows headers fuck with it. */
#undef min
#undef max

/* Some compilers do not support const members in anonymous unions. So
* far, GCC (>= 4.6), CLang (3.0) and Visual Studio (>= 2010) appear to
* work properly. */


+ 4
- 2
win32/lolcore.vcxproj.filters Voir le fichier

@@ -363,12 +363,14 @@
<ClInclude Include="..\src\platform\xbox\xboxapp.h">
<Filter>src\platform\xbox</Filter>
</ClInclude>
<ClInclude Include="..\src\lol\debug.h" />
<ClInclude Include="..\src\gpu\indexbuffer.h">
<Filter>src\gpu</Filter>
</ClInclude>
<ClInclude Include="..\src\array.h">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\src\lol\debug.h">
<Filter>src\lol</Filter>
</ClInclude>
</ItemGroup>
</Project>
</Project>

Chargement…
Annuler
Enregistrer