0025075: BRepMesh - eliminate new x86_64 compiler warnings
authorkgv <kgv@opencascade.com>
Thu, 17 Jul 2014 09:34:05 +0000 (13:34 +0400)
committerbugmaster <bugmaster@opencascade.com>
Thu, 17 Jul 2014 09:38:09 +0000 (13:38 +0400)
BRepMesh - fix compilation without TBB support

Code style

src/BRepMesh/BRepMesh_WireChecker.cxx
src/BRepMesh/BRepMesh_WireInterferenceChecker.cxx
src/BRepMesh/BRepMesh_WireInterferenceChecker.hxx

index 7cd2434..e6d2366 100644 (file)
@@ -194,7 +194,7 @@ void BRepMesh_WireChecker::ReCompute(BRepMeshCol::HClassifier& theClassifier)
   if (!collectDiscretizedWires(aDWires))
     return;
 
-  const Standard_Integer aNbWires = aDWires.size();
+  const Standard_Integer aNbWires = (Standard_Integer)aDWires.size();
 
   BRepMeshCol::Array1OfSegmentsTree aWiresBiPoints(aNbWires);
   fillSegmentsTree(aDWires, aWiresBiPoints);
@@ -356,14 +356,14 @@ Standard_Boolean BRepMesh_WireChecker::collectDiscretizedWires(
 
 //=======================================================================
 //function : fillSegmentsTree
-//purpose  : 
+//purpose  :
 //=======================================================================
 void BRepMesh_WireChecker::fillSegmentsTree(
-  const SeqOfDWires&                 theDWires, 
+  const SeqOfDWires&                 theDWires,
   BRepMeshCol::Array1OfSegmentsTree& theWiresSegmentsTree)
 {
-  const Standard_Integer aNbWires = theDWires.size();
-  for (Standard_Integer aWireIt = 0; aWireIt < aNbWires; ++aWireIt)
+  const size_t aNbWires = theDWires.size();
+  for (size_t aWireIt = 0; aWireIt < aNbWires; ++aWireIt)
   {
     const SeqOfPnt2d&      aWire    = theDWires[aWireIt];
     const Standard_Integer aWireLen = aWire.Size();
index 3accbd5..8122624 100644 (file)
@@ -23,16 +23,16 @@ static const Standard_Real MIN_LOOP_S = 2 * M_PI * 2.E-5;
 #ifdef HAVE_TBB
 //=======================================================================
 //function : Constructor
-//purpose  : 
+//purpose  :
 //=======================================================================
 BRepMesh_WireInterferenceChecker::BRepMesh_WireInterferenceChecker(
   const std::vector<BRepMeshCol::SegmentsTree>& theWires,
   BRepMesh_Status*                              theStatus,
   Standard_Mutex*                               theMutex)
-  : myWires(&theWires.front()),
-    myWiresNb(theWires.size()),
-    myStatus(theStatus),
-    myMutex(theMutex)
+: myWires   (&theWires.front()),
+  myWiresNb ((Standard_Integer)theWires.size()),
+  myStatus  (theStatus),
+  myMutex   (theMutex)
 {
 }
 
@@ -52,11 +52,11 @@ void BRepMesh_WireInterferenceChecker::operator ()(
 //purpose  : 
 //=======================================================================
 BRepMesh_WireInterferenceChecker::BRepMesh_WireInterferenceChecker(
-  const std::vector<BRepMesh_WireChecker::SegmentsTree>& theWires,
-  BRepMesh_Status*                                       theStatus)
-  : myWires(&theWires.front()),
-    myWiresNb(theWires.size()),
-    myStatus(theStatus)
+  const std::vector<BRepMeshCol::SegmentsTree>& theWires,
+  BRepMesh_Status*                              theStatus)
+: myWires   (&theWires.front()),
+  myWiresNb ((Standard_Integer)theWires.size()),
+  myStatus  (theStatus)
 {
 }
 #endif
@@ -74,7 +74,7 @@ void BRepMesh_WireInterferenceChecker::operator ()(
   const BRepMeshCol::SegmentsTree&  aWireSegTree1  = myWires[theWireId];
   const BRepMeshCol::Segment*       aWireSegments1 = &aWireSegTree1.first->front();
   const BRepMeshCol::HBndBox2dTree& aWireBoxTree1  = aWireSegTree1.second;
-  const Standard_Integer aWireLen1 = aWireSegTree1.first->size();
+  const Standard_Integer aWireLen1 = (Standard_Integer)aWireSegTree1.first->size();
 
   for (Standard_Integer aWireIt = theWireId; aWireIt < myWiresNb; ++aWireIt)
   {
@@ -91,7 +91,7 @@ void BRepMesh_WireInterferenceChecker::operator ()(
     const BRepMeshCol::Segment*       aWireSegments2 = &aWireSegTree2.first->front();
     const BRepMeshCol::HBndBox2dTree& aWireBoxTree2  = aWireSegTree2.second;
 
-    BRepMesh_WireChecker::BndBox2dTreeSelector aSelector(aWireSegTree2.first->size());
+    BRepMesh_WireChecker::BndBox2dTreeSelector aSelector ((Standard_Integer)aWireSegTree2.first->size());
     for (Standard_Integer aSegmentId1 = 0; aSegmentId1 < aWireLen1; ++aSegmentId1)
     {
 #ifdef HAVE_TBB
index a445848..5432662 100644 (file)
@@ -61,8 +61,8 @@ public:
   //! \param theWires wires that should be checked.
   //! \param theStatus shared flag to set status of the check.
   BRepMesh_WireInterferenceChecker(
-    const std::vector<BRepMesh_WireChecker::SegmentsTree>& theWires,
-    BRepMesh_Status*                                       theStatus);
+    const std::vector<BRepMeshCol::SegmentsTree>& theWires,
+    BRepMesh_Status*                              theStatus);
 #endif
 
   //! Checker's body.