FEM: myStudyId not needed when SMESH >= 9

Put guards not just around its use, but also its creation.
This commit is contained in:
Chris Hennes
2025-03-22 18:14:06 -05:00
committed by Benjamin Nauck
parent 74dd1b15f4
commit fabe25bd06
2 changed files with 6 additions and 0 deletions

View File

@@ -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);

View File

@@ -224,7 +224,9 @@ private:
/// positioning matrix
Base::Matrix4D _Mtrx;
SMESH_Mesh* myMesh;
#if SMESH_VERSION_MAJOR < 9
const int myStudyId;
#endif
std::list<SMESH_HypothesisPtr> hypoth;
static SMESH_Gen* _mesh_gen;