Explorar el Código

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 hace 12 años
padre
commit
1bc2a7d705
Se han modificado 4 ficheros con 19 adiciones y 5 borrados
  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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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 Ver fichero

@@ -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>

Cargando…
Cancelar
Guardar