Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2797


Ignore:
Timestamp:
Mar 17, 2009, 10:53:53 PM (16 years ago)
Author:
landauf
Message:

Added some #ifndef's around #define NOMINMAX and #define FORCEINLINE to avoid "symbol redefined" compiler-warnings.

Reto, I hope this doesn't cause any troubles. If it does, I suggest using "#undef symbolname" instead of "#ifndef symbolname". This should then work basically as before, but without warnings.

Location:
code/trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/OrxonoxConfig.h.in

    r2761 r2797  
    8585/* See if we can use __forceinline or if we need to use __inline instead */
    8686#cmakedefine HAVE_FORCEINLINE
    87 #ifdef HAVE_FORCEINLINE
    88 #  define FORCEINLINE __forceinline
    89 #else
    90 #  define FORCEINLINE __inline
     87#ifndef FORCEINLINE
     88#  ifdef HAVE_FORCEINLINE
     89#    define FORCEINLINE __forceinline
     90#  else
     91#    define FORCEINLINE __inline
     92#  endif
    9193#endif
    9294
  • code/trunk/src/orxonox/gamestates/GSGraphics.h

    r2756 r2797  
    3232#include "OrxonoxPrereqs.h"
    3333#include <OgrePrerequisites.h>
    34 #define NOMINMAX // required to stop windows.h screwing up std::min definition
     34#ifndef NOMINMAX
     35#  define NOMINMAX // required to stop windows.h screwing up std::min definition
     36#endif
    3537#include <OgreWindowEventUtilities.h>
    3638#include "core/GameState.h"
  • code/trunk/src/orxonox/gamestates/GSRoot.cc

    r2759 r2797  
    4949#    define WIN32_LEAN_AND_MEAN
    5050#  endif
    51 #  define NOMINMAX // required to stop windows.h screwing up std::min definition
     51#  ifndef NOMINMAX
     52#    define NOMINMAX // required to stop windows.h screwing up std::min definition
     53#  endif
    5254#  include "windows.h"
    5355#endif
  • code/trunk/src/orxonox/pch/havepch/OrxonoxStableHeaders.h

    r2756 r2797  
    4545#  define WIN32_LEAN_AND_MEAN
    4646#endif
    47 #define NOMINMAX // required to stop windows.h screwing up std::min definition
     47#ifndef NOMINMAX
     48#  define NOMINMAX // required to stop windows.h screwing up std::min definition
     49#endif
    4850#include <Ogre.h>
    4951#include <CEGUI.h>
Note: See TracChangeset for help on using the changeset viewer.