From 64073458bd7efab536b181f28526696f13b9c81b Mon Sep 17 00:00:00 2001 From: Xavier Bonaventura Date: Tue, 13 May 2025 20:37:42 +0200 Subject: [PATCH] Fix warning abut inexistent warning (#6153) These warnings are not existing before Visual Studio 2015 Fixes #6151 Co-authored-by: Xavier Bonaventura Co-authored-by: Kim Kulling --- code/AssetLib/Blender/BlenderIntermediate.h | 4 ++-- include/assimp/defs.h | 5 ++++- include/assimp/mesh.h | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/code/AssetLib/Blender/BlenderIntermediate.h b/code/AssetLib/Blender/BlenderIntermediate.h index 8a31b7596..d9460e792 100644 --- a/code/AssetLib/Blender/BlenderIntermediate.h +++ b/code/AssetLib/Blender/BlenderIntermediate.h @@ -116,7 +116,7 @@ namespace Blender { mywrap arr; }; -#ifdef _MSC_VER +#if defined(_MSC_VER) && _MSC_VER < 1900 # pragma warning(disable:4351) #endif @@ -171,7 +171,7 @@ namespace Blender { // original file data const FileDatabase& db; }; -#ifdef _MSC_VER +#if defined(_MSC_VER) && _MSC_VER < 1900 # pragma warning(default:4351) #endif diff --git a/include/assimp/defs.h b/include/assimp/defs.h index 1d703bec1..2f98d0211 100644 --- a/include/assimp/defs.h +++ b/include/assimp/defs.h @@ -174,7 +174,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * Used in code analysis to skip dead paths (e.g. after an assertion evaluated to false). */ #ifdef _MSC_VER - #pragma warning(disable : 4521 4512 4714 4127 4351 4510) + #pragma warning(disable : 4521 4512 4714 4127 4510) + #if _MSC_VER < 1900 + #pragma warning(disable : 4351) + #endif #ifdef ASSIMP_BUILD_DLL_EXPORT #pragma warning(disable : 4251) #endif diff --git a/include/assimp/mesh.h b/include/assimp/mesh.h index 19d002995..609f62e10 100644 --- a/include/assimp/mesh.h +++ b/include/assimp/mesh.h @@ -51,7 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma GCC system_header #endif -#ifdef _MSC_VER +#if defined(_MSC_VER) && _MSC_VER < 1900 #pragma warning(disable : 4351) #endif // _MSC_VER