From fabe25bd06e0a8f2bb26f3309ea91905f3a13ade Mon Sep 17 00:00:00 2001 From: Chris Hennes Date: Sat, 22 Mar 2025 18:14:06 -0500 Subject: [PATCH] FEM: myStudyId not needed when SMESH >= 9 Put guards not just around its use, but also its creation. --- src/Mod/Fem/App/FemMesh.cpp | 4 ++++ src/Mod/Fem/App/FemMesh.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/Mod/Fem/App/FemMesh.cpp b/src/Mod/Fem/App/FemMesh.cpp index 9802d218cc..c026483702 100644 --- a/src/Mod/Fem/App/FemMesh.cpp +++ b/src/Mod/Fem/App/FemMesh.cpp @@ -88,7 +88,9 @@ TYPESYSTEM_SOURCE(Fem::FemMesh, Base::Persistence) FemMesh::FemMesh() : myMesh(nullptr) +#if SMESH_VERSION_MAJOR < 9 , myStudyId(0) +#endif { #if SMESH_VERSION_MAJOR >= 9 myMesh = getGenerator()->CreateMesh(false); @@ -99,7 +101,9 @@ FemMesh::FemMesh() FemMesh::FemMesh(const FemMesh& mesh) : myMesh(nullptr) +#if SMESH_VERSION_MAJOR < 9 , myStudyId(0) +#endif { #if SMESH_VERSION_MAJOR >= 9 myMesh = getGenerator()->CreateMesh(false); diff --git a/src/Mod/Fem/App/FemMesh.h b/src/Mod/Fem/App/FemMesh.h index 09b7070fb8..af79553857 100644 --- a/src/Mod/Fem/App/FemMesh.h +++ b/src/Mod/Fem/App/FemMesh.h @@ -224,7 +224,9 @@ private: /// positioning matrix Base::Matrix4D _Mtrx; SMESH_Mesh* myMesh; +#if SMESH_VERSION_MAJOR < 9 const int myStudyId; +#endif std::list hypoth; static SMESH_Gen* _mesh_gen;