Преглед на файлове

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 преди 12 години
родител
ревизия
1bc2a7d705
променени са 4 файла, в които са добавени 19 реда и са изтрити 5 реда
  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 Целия файл

@@ -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 Целия файл

@@ -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 Целия файл

@@ -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 Целия файл

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

Зареждане…
Отказ
Запис