Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2756 for code/trunk/src/util


Ignore:
Timestamp:
Mar 8, 2009, 1:24:15 PM (15 years ago)
Author:
rgrieder
Message:

Minimising problems when including windows.h because it defines macros like "min" and "max" if not explicitly specified.
There are two headers we use that include windows.h: OgreWindowEventUtilities.h and enet.h. I had to tweak a little bit there as well.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/util/Math.h

    r2710 r2756  
    5151#include <OgreColourValue.h>
    5252
    53 //Get around Windows hackery
    54 #ifdef ORXONOX_PLATFORM_WINDOWS
    55 #  ifdef max
    56 #    undef max
    57 #  endif
    58 #  ifdef min
    59 #    undef min
    60 #  endif
     53// Certain headers might define min and max macros
     54#if defined(max) || defined(min) || defined(sgn) || defined(clamp) || defined(square) || defined(mod)
     55#  error An inline math function was overridden by a macro
    6156#endif
    6257
Note: See TracChangeset for help on using the changeset viewer.