From 90e022a100d020aa89bf277cbb2b146e166731ba Mon Sep 17 00:00:00 2001 From: Daniel Buckmaster Date: Wed, 26 Sep 2012 23:26:02 +1000 Subject: [PATCH] Prevented #define for in VS2012. --- Engine/source/platform/types.visualc.h | 2 ++ Engine/source/platform/typesWin32.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Engine/source/platform/types.visualc.h b/Engine/source/platform/types.visualc.h index baedd85dd..4379e8a57 100644 --- a/Engine/source/platform/types.visualc.h +++ b/Engine/source/platform/types.visualc.h @@ -88,7 +88,9 @@ typedef unsigned _int64 U64; # define FN_CDECL __cdecl ///< Calling convention #endif +#if _MSC_VER < 1700 #define for if(false) {} else for ///< Hack to work around Microsoft VC's non-C++ compliance on variable scoping +#endif // disable warning caused by memory layer // see msdn.microsoft.com "Compiler Warning (level 1) C4291" for more details diff --git a/Engine/source/platform/typesWin32.h b/Engine/source/platform/typesWin32.h index 247baa355..c4b2aa2b2 100644 --- a/Engine/source/platform/typesWin32.h +++ b/Engine/source/platform/typesWin32.h @@ -116,8 +116,10 @@ static const F32 F32_MAX = F32(3.402823466e+38F); ///< Constant #ifdef _MSC_VER +#if _MSC_VER < 1700 #define for if(false) {} else for ///< Hack to work around Microsoft VC's non-C++ compliance on variable scoping #endif +#endif #endif //_NTYPES_H_