3rdParty/salomesmesh: fix a couple error-prone warnings
The Warnings was about hiding bases class RemoveElement() and RemoveFreeElement() virtual methodes which may caused calling wrong function by bases class pointer.
This commit is contained in:
parent
cf652c8410
commit
c3dfc7e30c
|
@ -372,7 +372,7 @@ public:
|
|||
|
||||
void MoveNode(const SMDS_MeshNode *, double x, double y, double z);
|
||||
virtual void RemoveNode(const SMDS_MeshNode *);
|
||||
void RemoveElement(const SMDS_MeshElement *);
|
||||
virtual void RemoveElement(const SMDS_MeshElement *, bool removenodes = false);
|
||||
|
||||
/*! Remove only the given element/node and only if it is free.
|
||||
* Methods do not work for meshes with descendants.
|
||||
|
@ -380,6 +380,7 @@ public:
|
|||
*/
|
||||
void RemoveFreeNode (const SMDS_MeshNode *, SMESHDS_SubMesh *, bool fromGroups=true);
|
||||
void RemoveFreeElement(const SMDS_MeshElement *, SMESHDS_SubMesh *, bool fromGroups=true);
|
||||
virtual void RemoveFreeElement(const SMDS_MeshElement *); ///< reimplement virtual from the base class
|
||||
|
||||
void ClearMesh();
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ class SMESH_EXPORT SMESH_subMeshEventListener {
|
|||
bool myIsDeletable; //!< if true, it will be deleted by SMESH_subMesh
|
||||
public:
|
||||
SMESH_subMeshEventListener(bool isDeletable):myIsDeletable(isDeletable) {}
|
||||
virtual ~SMESH_subMeshEventListener() {};
|
||||
bool IsDeletable() const { return myIsDeletable; }
|
||||
/*!
|
||||
* \brief Do something on a certain event
|
||||
|
|
|
@ -755,7 +755,7 @@ void SMESHDS_Mesh::RemoveFreeNode(const SMDS_MeshNode * n,
|
|||
//function : RemoveElement
|
||||
//purpose :
|
||||
//========================================================================
|
||||
void SMESHDS_Mesh::RemoveElement(const SMDS_MeshElement * elt)
|
||||
void SMESHDS_Mesh::RemoveElement(const SMDS_MeshElement * elt, bool removenodes)
|
||||
{
|
||||
if (elt->GetType() == SMDSAbs_Node)
|
||||
{
|
||||
|
@ -779,9 +779,18 @@ void SMESHDS_Mesh::RemoveElement(const SMDS_MeshElement * elt)
|
|||
list<const SMDS_MeshElement *> removedElems;
|
||||
list<const SMDS_MeshElement *> removedNodes;
|
||||
|
||||
SMDS_Mesh::RemoveElement(elt, removedElems, removedNodes, false);
|
||||
SMDS_Mesh::RemoveElement(elt, removedElems, removedNodes, removenodes);
|
||||
|
||||
removeFromContainers( myShapeIndexToSubMesh, myGroups, removedElems, false );
|
||||
removeFromContainers( myShapeIndexToSubMesh, myGroups, removedElems, removenodes );
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : RemoveFreeElement
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void SMESHDS_Mesh::RemoveFreeElement(const SMDS_MeshElement * elt)
|
||||
{
|
||||
RemoveFreeElement (elt, 0);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@ -1036,7 +1045,7 @@ void SMESHDS_Mesh::UnSetMeshElementOnShape(const SMDS_MeshElement * elem,
|
|||
//=======================================================================
|
||||
TopoDS_Shape SMESHDS_Mesh::ShapeToMesh() const
|
||||
{
|
||||
return myShape;
|
||||
return myShape;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@ -1552,7 +1561,7 @@ SMDS_MeshVolume* SMESHDS_Mesh::AddVolumeWithID(int n1, int n2, int n3, int n4, i
|
|||
n15,n25,n35,n45);
|
||||
return anElem;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : AddVolumeWithID
|
||||
//purpose : 2d order pyramid of 13 nodes
|
||||
|
|
Loading…
Reference in New Issue
Block a user