From a0065803ff8e62e1ec113d96484ab29587738688 Mon Sep 17 00:00:00 2001 From: Daniel Gibson Date: Sun, 6 Sep 2020 04:28:43 +0200 Subject: [PATCH] MSVC: Shut up Compiler warning in Matrix.h if asserts are disabled --- idlib/math/Matrix.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/idlib/math/Matrix.h b/idlib/math/Matrix.h index 785ac8f..4a8935a 100644 --- a/idlib/math/Matrix.h +++ b/idlib/math/Matrix.h @@ -34,6 +34,12 @@ If you have questions concerning this license or the applicable additional terms #include #endif +#ifdef _MSC_VER // DG: I don't care if matrix code has some unused r variable only used for assertions, shut up VS +#pragma warning( push ) +#pragma warning( disable : 4189 ) +#endif + + /* =============================================================================== @@ -2946,4 +2952,8 @@ ID_INLINE float *idMatX::ToFloatPtr( void ) { return mat; } +#ifdef _MSC_VER // DG: re-enable warning 4189 +#pragma warning( pop ) +#endif + #endif /* !__MATH_MATRIX_H__ */