From: Viktor UZLOV Date: Wed, 10 Feb 2021 15:10:28 +0000 (+0300) Subject: fix after review X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=27527959cd491b11d48490b985cc8cc13aeed93a;p=modules%2Fgui.git fix after review --- diff --git a/src/VTKViewer/VTKViewer_Actor.cxx b/src/VTKViewer/VTKViewer_Actor.cxx index b63ee8146..24211a36a 100644 --- a/src/VTKViewer/VTKViewer_Actor.cxx +++ b/src/VTKViewer/VTKViewer_Actor.cxx @@ -433,7 +433,7 @@ VTKViewer_Actor /*! Maps VTK index of a node to corresponding object index */ -int +vtkIdType VTKViewer_Actor ::GetNodeObjId(vtkIdType theVtkID) { @@ -453,7 +453,7 @@ VTKViewer_Actor /*! Maps object index of a node to corresponding VTK index */ -int +vtkIdType VTKViewer_Actor ::GetNodeVtkId( vtkIdType theObjID ) { @@ -474,7 +474,7 @@ VTKViewer_Actor /*! Maps VTK index of a cell to corresponding object index */ -int +vtkIdType VTKViewer_Actor ::GetElemObjId(vtkIdType theVtkID) { diff --git a/src/VTKViewer/VTKViewer_Actor.h b/src/VTKViewer/VTKViewer_Actor.h index dd37acc96..61000a8b7 100644 --- a/src/VTKViewer/VTKViewer_Actor.h +++ b/src/VTKViewer/VTKViewer_Actor.h @@ -138,7 +138,7 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor // For selection mapping purpose //! Maps VTK index of a node to corresponding object index virtual - int + vtkIdType GetNodeObjId(vtkIdType theVtkID); //! Get coordinates of a node for given object index @@ -148,12 +148,12 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor //! Maps object index of a node to corresponding VTK index virtual - int + vtkIdType GetNodeVtkId(vtkIdType theObjID); //! Maps VTK index of a cell to corresponding object index virtual - int + vtkIdType GetElemObjId(vtkIdType theVtkID); //! Get corresponding #vtkCell for given object index diff --git a/src/VTKViewer/VTKViewer_AppendFilter.cxx b/src/VTKViewer/VTKViewer_AppendFilter.cxx index 02f9195cd..ac12cdc45 100644 --- a/src/VTKViewer/VTKViewer_AppendFilter.cxx +++ b/src/VTKViewer/VTKViewer_AppendFilter.cxx @@ -149,7 +149,7 @@ namespace { theInputID = theInputDataSetID = -1; - vtkIdType aNbInputs = (int)theRanges.size(); //!< TODO: conversion from size_t to int + vtkIdType aNbInputs = (vtkIdType)theRanges.size(); //!< TODO: conversion from size_t to vtkIdType if(theInputDataSetID < 0 || theInputDataSetID >= aNbInputs) return -1; @@ -201,7 +201,7 @@ namespace return; vtkIdType aStartId = 0; - vtkIdType aNbInputs = (int)theRanges.size(); //!< TODO: conversion from size_t to int + vtkIdType aNbInputs = (vtkIdType)theRanges.size(); //!< TODO: conversion from size_t to vtkIdType for(vtkIdType aDataSetId = 0; aDataSetId < aNbInputs; ++aDataSetId){ vtkIdType aRange = theRanges[aDataSetId]; if(aRange > theOutputID){ diff --git a/src/VTKViewer/VTKViewer_ArcBuilder.cxx b/src/VTKViewer/VTKViewer_ArcBuilder.cxx index ef848bda1..87b99e556 100644 --- a/src/VTKViewer/VTKViewer_ArcBuilder.cxx +++ b/src/VTKViewer/VTKViewer_ArcBuilder.cxx @@ -640,7 +640,7 @@ vtkIdType Build1DArc(vtkIdType cellId, vtkUnstructuredGrid* input, vtkIdType MergevtkPoints(const std::vector< vtkSmartPointer< vtkPoints > >& theCollection, const std::vector< std::vector >& theScalarCollection, vtkPoints* thePoints, - std::map& thePntId2ScalarValue, + std::map& thePntId2ScalarValue, vtkIdType* &theIds){ vtkIdType aNbPoints = 0; vtkIdType anIdCounter = 0; diff --git a/src/VTKViewer/VTKViewer_ArcBuilder.h b/src/VTKViewer/VTKViewer_ArcBuilder.h index c73c71b95..b42cd9133 100644 --- a/src/VTKViewer/VTKViewer_ArcBuilder.h +++ b/src/VTKViewer/VTKViewer_ArcBuilder.h @@ -41,7 +41,7 @@ typedef std::list PntList; vtkIdType MergevtkPoints(const std::vector< vtkSmartPointer< vtkPoints > >& theCollection, const std::vector< std::vector >& theScalarCollection, vtkPoints* thePoints, - std::map& thePntId2ScalarValue, + std::map& thePntId2ScalarValue, vtkIdType* &theIds); vtkIdType Build1DArc(vtkIdType cellId, diff --git a/src/VTKViewer/VTKViewer_ConvexTool.cxx b/src/VTKViewer/VTKViewer_ConvexTool.cxx index ef39a661d..23d2d8333 100644 --- a/src/VTKViewer/VTKViewer_ConvexTool.cxx +++ b/src/VTKViewer/VTKViewer_ConvexTool.cxx @@ -114,7 +114,7 @@ VTKViewer_Triangulator double anAbsoluteCoord[3]; myPoints->SetNumberOfPoints(aNumPts); vtkPoints *anInputPoints = theInput->GetPoints(); - for (int aPntId = 0; aPntId < aNumPts; aPntId++) { + for (auto aPntId = 0; aPntId < aNumPts; aPntId++) { anInputPoints->GetPoint(myPointIds[aPntId], anAbsoluteCoord); myPoints->SetPoint(aPntId, anAbsoluteCoord); } @@ -216,7 +216,7 @@ VTKViewer_Triangulator double aCellCenter[3] = {0.0, 0.0, 0.0}; { double aPntCoord[3]; - for (int aPntId = 0; aPntId < aNumPts; aPntId++) { + for (auto aPntId = 0; aPntId < aNumPts; aPntId++) { aPoints->GetPoint(GetPointId(aPntId),aPntCoord); if(DEBUG_TRIA_EXECUTE) cout<<"\taPntId = "< TFace2PointIds; TFace2PointIds aFace2PointIds; - for (int aFaceId = 0; aFaceId < aNumFaces; aFaceId++) { + for (auto aFaceId = 0; aFaceId < aNumFaces; aFaceId++) { vtkCell* aFace = GetFace(aFaceId); GetCellNeighbors(theInput, theCellId, aFace, myCellIds); @@ -270,7 +270,7 @@ VTKViewer_Triangulator ::TPolygons aPolygons; - for (int aFaceId = 0; aFaceId < aNumFaces; aFaceId++) { + for (auto aFaceId = 0; aFaceId < aNumFaces; aFaceId++) { if(aFace2Visibility.find(aFaceId) == aFace2Visibility.end()) continue; @@ -405,7 +405,7 @@ VTKViewer_Triangulator if(DEBUG_TRIA_EXECUTE) cout << "; Added = FALSE" << endl; } } - int aNbPoints = (int)aPointIds.size(); //!< TODO: conversion from size_t to int + auto aNbPoints = aPointIds.size(); //!< TODO: conversion from size_t to int aCenter[0] /= aNbPoints; aCenter[1] /= aNbPoints; aCenter[2] /= aNbPoints; @@ -523,7 +523,7 @@ VTKViewer_Triangulator } if(!aSortedPointIds.empty()){ - int aNumFacePts = (int)aSortedPointIds.size(); //!< TODO: conversion from size_t to int + auto aNumFacePts = aSortedPointIds.size(); //!< TODO: conversion from size_t to int ::TConnectivities aConnectivities(aNumFacePts); TSortedPointIds::const_iterator anIter = aSortedPointIds.begin(); TSortedPointIds::const_iterator anEndIter = aSortedPointIds.end(); @@ -544,8 +544,8 @@ VTKViewer_Triangulator // To check, whether the polygons give a convex polyhedron or not if(theIsCheckConvex){ - int aNbPolygons = (int)aPolygons.size(); //!< TODO: conversion from size_t to int - for (int aPolygonId = 0; aPolygonId < aNbPolygons; aPolygonId++) { + auto aNbPolygons = aPolygons.size(); //!< TODO: conversion from size_t to int + for (auto aPolygonId = 0; aPolygonId < aNbPolygons; aPolygonId++) { ::TPolygon& aPolygon = aPolygons[aPolygonId]; double* aNormal = aPolygon.myNormal; double* anOrigin = aPolygon.myOrigin; @@ -569,8 +569,8 @@ VTKViewer_Triangulator // To pass resulting set of the polygons to the output { - int aNbPolygons = (int)aPolygons.size(); //!< TODO: conversion from size_t to int - for (int aPolygonId = 0; aPolygonId < aNbPolygons; aPolygonId++) { + auto aNbPolygons = aPolygons.size(); //!< TODO: conversion from size_t to int + for (auto aPolygonId = 0; aPolygonId < aNbPolygons; aPolygonId++) { ::TPolygon& aPolygon = aPolygons[aPolygonId]; if(DEBUG_TRIA_EXECUTE) cout << "PoilygonId="<InsertNextCell(VTK_POLYGON,aNbPoints,&aConnectivities[0]); if(theStoreMapping) VTKViewer_GeometryFilter::InsertId( theCellId, VTK_POLYGON, theVTK2ObjIds, theDimension2VTK2ObjIds ); @@ -636,7 +636,7 @@ VTKViewer_OrderedTriangulator zSize = aBounds[5] - aBounds[4]; double anAbsoluteCoord[3]; double aParamentrucCoord[3]; - for (int aPntId = 0; aPntId < aNumPts; aPntId++) { + for (auto aPntId = 0; aPntId < aNumPts; aPntId++) { myPoints->GetPoint(aPntId, anAbsoluteCoord); aParamentrucCoord[0] = xSize==0. ? 0. : ((anAbsoluteCoord[0] - aBounds[0]) / xSize); aParamentrucCoord[1] = ySize==0. ? 0. : ((anAbsoluteCoord[1] - aBounds[2]) / ySize); diff --git a/src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.cxx b/src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.cxx index 0b392acaa..e5ae6ff48 100644 --- a/src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.cxx +++ b/src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.cxx @@ -81,12 +81,12 @@ void VTKViewer_ExtractUnstructuredGrid::SetStoreMapping(int theStoreMapping) } } -vtkIdType VTKViewer_ExtractUnstructuredGrid::GetInputId(int theOutId) const +vtkIdType VTKViewer_ExtractUnstructuredGrid::GetInputId(vtkIdType theOutId) const { if ( myPassAll || ( myCellIds.empty() && myCellTypes.empty() )) return theOutId; - if ( theOutId<0 || theOutId >= (int)myOut2InId.size() ) + if ( theOutId<0 || theOutId >= myOut2InId.size() ) return -1; return myOut2InId[theOutId]; } @@ -281,7 +281,7 @@ void VTKViewer_ExtractUnstructuredGrid::BuildOut2InMap() // } -inline int InsertCell(vtkUnstructuredGrid *theInput, +inline vtkIdType InsertCell(vtkUnstructuredGrid *theInput, vtkCellArray *theConnectivity, vtkUnsignedCharArray* theCellTypesArray, vtkIdTypeArray*& theFaces, diff --git a/src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.h b/src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.h index 64ff52fa0..9da01f33c 100644 --- a/src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.h +++ b/src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.h @@ -95,7 +95,7 @@ public: //! Computes a map out IDs to in IDs. Call it before GetInputId()!!! void BuildOut2InMap(); //! Gets the input id by output id. Call BuildOut2InMap() before - vtkIdType GetInputId(int theOutId) const; + vtkIdType GetInputId(vtkIdType theOutId) const; //! Gets the output id by input id. //vtkIdType GetOutputId(int theInId) const; diff --git a/src/VTKViewer/VTKViewer_GeometryFilter.cxx b/src/VTKViewer/VTKViewer_GeometryFilter.cxx index a7e6717c3..d43232e7a 100644 --- a/src/VTKViewer/VTKViewer_GeometryFilter.cxx +++ b/src/VTKViewer/VTKViewer_GeometryFilter.cxx @@ -192,7 +192,7 @@ VTKViewer_GeometryFilter } vtkIdType cellId; - int i; + vtkIdType i; int allVisible; vtkIdType npts = 0; vtkIdType const *pts = 0; @@ -276,7 +276,7 @@ VTKViewer_GeometryFilter quad1D2DTypes.insert( VTK_BIQUADRATIC_QUAD ); quad1D2DTypes.insert( VTK_QUADRATIC_POLYGON ); - for ( int i = 0; i < types->GetNumberOfTuples() && !hasQuad1D2D; ++i ) + for ( auto i = 0; i < types->GetNumberOfTuples() && !hasQuad1D2D; ++i ) hasQuad1D2D = quad1D2DTypes.count( types->GetValue(i) ); } buildArcs = hasQuad1D2D; @@ -339,7 +339,7 @@ VTKViewer_GeometryFilter // Loop over all cells now that visibility is known // (Have to compute visibility first for 3D cell boundaries) - int progressInterval = numCells/20 + 1; + vtkIdType progressInterval = numCells/20 + 1; TMapOfVectorId aDimension2VTK2ObjIds; if ( myStoreMapping ) aDimension2VTK2ObjIds.resize( 3 ); // max dimension is 2 @@ -466,7 +466,7 @@ VTKViewer_GeometryFilter { #ifdef SHOW_COINCIDING_3D_PAL21924 faceIdsTmp->SetNumberOfIds( npts ); - for ( int ai = 0; ai < npts; ai++ ) + for ( auto ai = 0; ai < npts; ai++ ) faceIdsTmp->SetId( ai, pts[ai] ); input->GetCellNeighbors(cellId, faceIdsTmp, cellIdsTmp); #endif @@ -480,7 +480,7 @@ VTKViewer_GeometryFilter faceIds->InsertNextId(pts[faceVerts[1]]); faceIds->InsertNextId(pts[faceVerts[2]]); input->GetCellNeighbors(cellId, faceIds, cellIds); - int nbNeighbors = cellIds->GetNumberOfIds() - cellIdsTmp->GetNumberOfIds(); + vtkIdType nbNeighbors = cellIds->GetNumberOfIds() - cellIdsTmp->GetNumberOfIds(); #ifdef SHOW_COINCIDING_3D_PAL21924 bool process = nbNeighbors <= 0; #else @@ -523,7 +523,7 @@ VTKViewer_GeometryFilter { #ifdef SHOW_COINCIDING_3D_PAL21924 faceIdsTmp->SetNumberOfIds( npts ); - for ( int ai = 0; ai < npts; ai++ ) + for ( auto ai = 0; ai < npts; ai++ ) faceIdsTmp->SetId( ai, pts[ai] ); input->GetCellNeighbors(cellId, faceIdsTmp, cellIdsTmp); #endif @@ -538,7 +538,7 @@ VTKViewer_GeometryFilter aCellType = VTK_QUAD; numFacePts = 4; input->GetCellNeighbors(cellId, faceIds, cellIds); - int nbNeighbors = cellIds->GetNumberOfIds() - cellIdsTmp->GetNumberOfIds(); + vtkIdType nbNeighbors = cellIds->GetNumberOfIds() - cellIdsTmp->GetNumberOfIds(); #ifdef SHOW_COINCIDING_3D_PAL21924 bool process = nbNeighbors <= 0; #else @@ -581,7 +581,7 @@ VTKViewer_GeometryFilter { #ifdef SHOW_COINCIDING_3D_PAL21924 faceIdsTmp->SetNumberOfIds( npts ); - for ( int ai = 0; ai < npts; ai++ ) + for ( auto ai = 0; ai < npts; ai++ ) faceIdsTmp->SetId( ai, pts[ai] ); input->GetCellNeighbors(cellId, faceIdsTmp, cellIdsTmp); #endif @@ -596,7 +596,7 @@ VTKViewer_GeometryFilter faceIds->InsertNextId(pts[faceVerts[2]]); faceIds->InsertNextId(pts[faceVerts[3]]); input->GetCellNeighbors(cellId, faceIds, cellIds); - int nbNeighbors = cellIds->GetNumberOfIds() - cellIdsTmp->GetNumberOfIds(); + vtkIdType nbNeighbors = cellIds->GetNumberOfIds() - cellIdsTmp->GetNumberOfIds(); #ifdef SHOW_COINCIDING_3D_PAL21924 bool process = nbNeighbors <= 0; #else @@ -659,7 +659,7 @@ VTKViewer_GeometryFilter numFacePts = 4; } input->GetCellNeighbors(cellId, faceIds, cellIds); - int nbNeighbors = cellIds->GetNumberOfIds() - cellIdsTmp->GetNumberOfIds(); + vtkIdType nbNeighbors = cellIds->GetNumberOfIds() - cellIdsTmp->GetNumberOfIds(); #ifdef SHOW_COINCIDING_3D_PAL21924 bool process = nbNeighbors <= 0; #else @@ -702,7 +702,7 @@ VTKViewer_GeometryFilter { #ifdef SHOW_COINCIDING_3D_PAL21924 faceIdsTmp->SetNumberOfIds( npts ); - for ( int ai = 0; ai < npts; ai++ ) + for ( auto ai = 0; ai < npts; ai++ ) faceIdsTmp->SetId( ai, pts[ai] ); input->GetCellNeighbors(cellId, faceIdsTmp, cellIdsTmp); #endif @@ -724,7 +724,7 @@ VTKViewer_GeometryFilter numFacePts = 6; } input->GetCellNeighbors(cellId, faceIds, cellIds); - int nbNeighbors = cellIds->GetNumberOfIds() - cellIdsTmp->GetNumberOfIds(); + vtkIdType nbNeighbors = cellIds->GetNumberOfIds() - cellIdsTmp->GetNumberOfIds(); #ifdef SHOW_COINCIDING_3D_PAL21924 bool process = nbNeighbors <= 0; #else @@ -748,7 +748,7 @@ VTKViewer_GeometryFilter if ( myShowInside ) { aCellType = VTK_LINE; - for ( int edgeID = 0; edgeID < 8; ++edgeID ) + for ( auto edgeID = 0; edgeID < 8; ++edgeID ) { const vtkIdType *edgeVerts = vtkPyramid::GetEdgeArray( edgeID ); if ( toShowEdge( pts[edgeVerts[0]], pts[edgeVerts[1]], cellId, input )) @@ -767,7 +767,7 @@ VTKViewer_GeometryFilter { #ifdef SHOW_COINCIDING_3D_PAL21924 faceIdsTmp->SetNumberOfIds( npts ); - for ( int ai = 0; ai < npts; ai++ ) + for ( auto ai = 0; ai < npts; ai++ ) faceIdsTmp->SetId( ai, pts[ai] ); input->GetCellNeighbors(cellId, faceIdsTmp, cellIdsTmp); #endif @@ -787,7 +787,7 @@ VTKViewer_GeometryFilter numFacePts = 4; } input->GetCellNeighbors(cellId, faceIds, cellIds); - int nbNeighbors = cellIds->GetNumberOfIds() - cellIdsTmp->GetNumberOfIds(); + vtkIdType nbNeighbors = cellIds->GetNumberOfIds() - cellIdsTmp->GetNumberOfIds(); #ifdef SHOW_COINCIDING_3D_PAL21924 bool process = nbNeighbors <= 0; #else @@ -812,7 +812,7 @@ VTKViewer_GeometryFilter { vtkIdType nFaces = 0; const vtkIdType* ptIds = 0; - int idp = 0; + vtkIdType idp = 0; input->GetFaceStream(cellId, nFaces, ptIds); #ifdef SHOW_COINCIDING_3D_PAL21924 if ( !myShowInside ) @@ -833,7 +833,7 @@ VTKViewer_GeometryFilter { faceIds->Reset(); numFacePts = ptIds[idp]; - int pt0 = ++idp; + vtkIdType pt0 = ++idp; for (i = 0; i < numFacePts; i++) { faceIds->InsertNextId(ptIds[idp + i]); @@ -846,7 +846,7 @@ VTKViewer_GeometryFilter default:aCellType = VTK_POLYGON; } input->GetCellNeighbors(cellId, faceIds, cellIds); - int nbNeighbors = cellIds->GetNumberOfIds() - cellIdsTmp->GetNumberOfIds(); + vtkIdType nbNeighbors = cellIds->GetNumberOfIds() - cellIdsTmp->GetNumberOfIds(); if ( myShowInside && nbNeighbors > 0 && cellId < cellIds->GetId(0) ) continue; // don't add twice same internal face in wireframe mode #ifdef SHOW_COINCIDING_3D_PAL21924 @@ -940,7 +940,7 @@ VTKViewer_GeometryFilter #ifdef SHOW_COINCIDING_3D_PAL21924 if ( !myShowInside ) { - int npts1 = 0; + vtkIdType npts1 = 0; switch (aCellType ){ case VTK_QUADRATIC_TETRA: npts1 = 4; break; case VTK_QUADRATIC_HEXAHEDRON: npts1 = 8; break; @@ -951,7 +951,7 @@ VTKViewer_GeometryFilter } faceIdsTmp->SetNumberOfIds( npts1 ); if ( npts1 > 0 ) { - for (int ai=0; aiSetId( ai, pts[ai] ); input->GetCellNeighbors(cellId, faceIdsTmp, cellIdsTmp); } @@ -959,8 +959,8 @@ VTKViewer_GeometryFilter #endif aCellType = VTK_TRIANGLE; numFacePts = 3; - int nbNeighbors = 0; - for (int j=0; j < cell->GetNumberOfFaces(); j++) + vtkIdType nbNeighbors = 0; + for (auto j=0; j < cell->GetNumberOfFaces(); j++) { vtkCell *face = cell->GetFace(j); if ( !myShowInside ) { @@ -1117,11 +1117,11 @@ VTKViewer_GeometryFilter } else { - int nbCoincident = 0; + vtkIdType nbCoincident = 0; #ifdef SHOW_COINCIDING_3D_PAL21924 - int nbPnt = npts - cell->GetNumberOfEdges(); + vtkIdType nbPnt = npts - cell->GetNumberOfEdges(); faceIdsTmp->SetNumberOfIds( nbPnt ); - for ( int ai = 0; ai < nbPnt; ai++ ) + for ( auto ai = 0; ai < nbPnt; ai++ ) faceIdsTmp->SetId( ai, pts[ai] ); input->GetCellNeighbors(cellId, faceIdsTmp, cellIdsTmp); nbCoincident = cellIdsTmp->GetNumberOfIds(); @@ -1132,11 +1132,11 @@ VTKViewer_GeometryFilter { vtkCell * face = cell->GetFace( faceId ); input->GetCellNeighbors( cellId, face->GetPointIds(), cellIds ); - int nbNeighbors = cellIds->GetNumberOfIds() - nbCoincident; + vtkIdType nbNeighbors = cellIds->GetNumberOfIds() - nbCoincident; if ( nbNeighbors <= 0 ) { - int nbEdges = face->GetNumberOfPoints() / 2; - for ( int edgeId = 0; edgeId < nbEdges; ++edgeId ) + vtkIdType nbEdges = face->GetNumberOfPoints() / 2; + for ( auto edgeId = 0; edgeId < nbEdges; ++edgeId ) { vtkIdType p1 = ( edgeId ); // corner vtkIdType p2 = ( edgeId + nbEdges ); // medium @@ -1428,10 +1428,10 @@ void VTKViewer_GeometryFilter::BuildArcedPolygon(vtkIdType cellId, } case VTK_QUADRATIC_POLYGON: { - int nbP = aCell->GetNumberOfPoints(); + vtkIdType nbP = aCell->GetNumberOfPoints(); std::vector< Pnt > pVec( nbP + 2 ); - for ( int i = 0; i < nbP/2; ++i ) + for ( auto i = 0; i < nbP/2; ++i ) { pVec[i*2 + 0] = CreatePnt( aCell, inputScalars, i ); pVec[i*2 + 1] = CreatePnt( aCell, inputScalars, i + nbP/2 ); @@ -1439,7 +1439,7 @@ void VTKViewer_GeometryFilter::BuildArcedPolygon(vtkIdType cellId, pVec[ nbP ] = pVec[ 0 ]; pVec[ nbP+1 ] = pVec[ 1 ]; - for ( int i = 0; i < nbP; i += 2 ) + for ( auto i = 0; i < nbP; i += 2 ) { VTKViewer_ArcBuilder aBuilder( pVec[i], pVec[i+1], pVec[i+2], myMaxArcAngle ); aCollection.push_back( aBuilder.GetPoints() ); @@ -1460,7 +1460,7 @@ void VTKViewer_GeometryFilter::BuildArcedPolygon(vtkIdType cellId, vtkIdType aTriangleId; vtkPolygon *aPlg = vtkPolygon::New(); - std::map aPntId2ScalarValue; + std::map aPntId2ScalarValue; aNbPoints = MergevtkPoints(aCollection, aScalarCollection, aPlg->GetPoints(), aPntId2ScalarValue, aNewPoints); aPlg->GetPointIds()->SetNumberOfIds(aNbPoints); @@ -1492,7 +1492,7 @@ void VTKViewer_GeometryFilter::BuildArcedPolygon(vtkIdType cellId, aPlg->Delete(); } else { - std::map aPntId2ScalarValue; + std::map aPntId2ScalarValue; aNbPoints = MergevtkPoints(aCollection, aScalarCollection, output->GetPoints(), aPntId2ScalarValue, aNewPoints); if(outputScalars) for(vtkIdType i = 0; i < aNbPoints; i++) diff --git a/src/VTKViewer/VTKViewer_ShrinkFilter.cxx b/src/VTKViewer/VTKViewer_ShrinkFilter.cxx index 114bf50b2..3cd713052 100644 --- a/src/VTKViewer/VTKViewer_ShrinkFilter.cxx +++ b/src/VTKViewer/VTKViewer_ShrinkFilter.cxx @@ -64,7 +64,8 @@ int VTKViewer_ShrinkFilter::RequestData( outInfo->Get(vtkDataObject::DATA_OBJECT())); vtkPoints *newPts; - int i, j, numIds, abort=0; + vtkIdType i, numIds, abort=0; + int j; vtkIdType cellId, numCells, numPts; vtkIdType oldId, newId; double center[3], *p, pt[3];