From 3baad52e535e7cff3756c1e529f017980f388ef9 Mon Sep 17 00:00:00 2001 From: ageay Date: Wed, 25 Jan 2012 09:09:40 +0000 Subject: [PATCH] Warning hunting --- src/INTERP_KERNEL/Polyhedron3D2DIntersectorP0P0.txx | 9 ++++----- .../MEDCouplingNormalizedUnstructuredMesh.txx | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/INTERP_KERNEL/Polyhedron3D2DIntersectorP0P0.txx b/src/INTERP_KERNEL/Polyhedron3D2DIntersectorP0P0.txx index 12a17bd45..59b46f921 100644 --- a/src/INTERP_KERNEL/Polyhedron3D2DIntersectorP0P0.txx +++ b/src/INTERP_KERNEL/Polyhedron3D2DIntersectorP0P0.txx @@ -99,21 +99,20 @@ namespace INTERP_KERNEL std::set listOfTetraFacesColinear; // calculate the coordinates of the nodes - const NumberingPolicy numPol=MyMeshType::My_numPol; typename MyMeshType::MyConnType cellSrc = *iterCellS; int cellSrcIdx = OTT::indFC(cellSrc); NormalizedCellType normCellType=Intersector3D::_src_mesh.getTypeOfElement(cellSrcIdx); const CellModel& cellModelCell=CellModel::GetCellModel(normCellType); - const MyMeshType& _src_mesh = Intersector3D::_src_mesh; - unsigned nbOfNodes4Type=cellModelCell.isDynamic() ? _src_mesh.getNumberOfNodesOfElement(cellSrcIdx) : cellModelCell.getNumberOfNodes(); + const MyMeshType& src_mesh = Intersector3D::_src_mesh; + unsigned nbOfNodes4Type=cellModelCell.isDynamic() ? src_mesh.getNumberOfNodesOfElement(cellSrcIdx) : cellModelCell.getNumberOfNodes(); int *polyNodes=new int[nbOfNodes4Type]; double **polyCoords = new double*[nbOfNodes4Type]; for(int i = 0;i<(int)nbOfNodes4Type;++i) { // we could store mapping local -> global numbers too, but not sure it is worth it - const int globalNodeNum = getGlobalNumberOfNode(i, OTT::indFC(*iterCellS), _src_mesh); + const int globalNodeNum = getGlobalNumberOfNode(i, OTT::indFC(*iterCellS), src_mesh); polyNodes[i]=globalNodeNum; - polyCoords[i] = (double*)_src_mesh.getCoordinatesPtr()+MyMeshType::MY_SPACEDIM*globalNodeNum; + polyCoords[i] = const_cast(src_mesh.getCoordinatesPtr()+MyMeshType::MY_SPACEDIM*globalNodeNum); } for(typename std::vector*>::iterator iter = _tetra.begin(); iter != _tetra.end(); ++iter) diff --git a/src/MEDCoupling/MEDCouplingNormalizedUnstructuredMesh.txx b/src/MEDCoupling/MEDCouplingNormalizedUnstructuredMesh.txx index ffeb9a81e..eb4188c98 100644 --- a/src/MEDCoupling/MEDCouplingNormalizedUnstructuredMesh.txx +++ b/src/MEDCoupling/MEDCouplingNormalizedUnstructuredMesh.txx @@ -114,7 +114,7 @@ template MEDCouplingNormalizedUnstructuredMesh::~MEDCouplingNormalizedUnstructuredMesh() { if(_mesh) - ((ParaMEDMEM::MEDCouplingUMesh *)_mesh)->decrRef(); + _mesh->decrRef(); releaseTempArrays(); } -- 2.39.2