diff --git a/Engine/source/platform/types.visualc.h b/Engine/source/platform/types.visualc.h index e383c1ea7..36d075d07 100644 --- a/Engine/source/platform/types.visualc.h +++ b/Engine/source/platform/types.visualc.h @@ -32,6 +32,16 @@ typedef signed _int64 S64; typedef unsigned _int64 U64; +// The types.h version of TORQUE_UNUSED no longer works for recent versions of MSVC. +// Since it appears that MS has made this impossible to do in a zero-overhead way, +// just turn the warning off in release builds. +#undef TORQUE_UNUSED +#ifdef TORQUE_DEBUG +#define TORQUE_UNUSED(var) ((0,0) ? (void)(var) : (void)0) +#else +#pragma warning(disable: 4189) // local variable is initialized but not referenced +#define TORQUE_UNUSED(var) ((void)0) +#endif //-------------------------------------- // Compiler Version