Salome HOME
Merge branch 'V9_8_BR'
[tools/medcoupling.git] / src / INTERP_KERNEL / DirectedBoundingBox.cxx
index 60912ed37b2fc582937c755f796a8d4ab8c4b0b4..e6fd18a6cb45c318610925d12531a8d4b31ff6cd 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2009-2012  OPEN CASCADE
+// Copyright (C) 2009-2021  OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -28,7 +28,6 @@
 #define __AXIS(i)     (&_axes[(i)*_dim])
 #define __MIN(i)      _minmax[i*2]
 #define __MAX(i)      _minmax[i*2+1]
-#define __MYID        (long(this)%10000)
 #define __DMP(msg) \
   //  cout << msg << endl
 
@@ -83,14 +82,18 @@ namespace
   bool JacobiEigenvectorsSearch( const int _dim, vector<double>& tensor, vector<double>& _axes)
   {
     if ( _dim == 3 )
-      __DMP( "Tensor : {"
-           << "{ "<<__TENSOR(0,0) << ", "<<__TENSOR(0,1) << ", "<<__TENSOR(0,2) << "} "
-           << "{ "<<__TENSOR(1,0) << ", "<<__TENSOR(1,1) << ", "<<__TENSOR(1,2) << "} "
-           << "{ "<<__TENSOR(2,0) << ", "<<__TENSOR(2,1) << ", "<<__TENSOR(2,2) << "}} ");
+      {
+        __DMP( "Tensor : {"
+               << "{ "<<__TENSOR(0,0) << ", "<<__TENSOR(0,1) << ", "<<__TENSOR(0,2) << "} "
+               << "{ "<<__TENSOR(1,0) << ", "<<__TENSOR(1,1) << ", "<<__TENSOR(1,2) << "} "
+               << "{ "<<__TENSOR(2,0) << ", "<<__TENSOR(2,1) << ", "<<__TENSOR(2,2) << "}} ");
+      }
     else
-      __DMP( "Tensor : {"
-           << "{ "<<__TENSOR(0,0) << ", "<<__TENSOR(0,1) << "} "
-           << "{ "<<__TENSOR(1,0) << ", "<<__TENSOR(1,1) << "}} ");
+      {
+        __DMP( "Tensor : {"
+          << "{ "<<__TENSOR(0,0) << ", "<<__TENSOR(0,1) << "} "
+          << "{ "<<__TENSOR(1,0) << ", "<<__TENSOR(1,1) << "}} ");
+      }
 
     const int maxRot = 5*_dim*_dim; // limit on number of rotations
     const double tol = 1e-9;
@@ -197,7 +200,7 @@ namespace INTERP_KERNEL
 
   //================================================================================
   /*!
-   * \brief Creates empty box intended to further initalization via setData()
+   * \brief Creates empty box intended to further initialization via setData()
    */
   //================================================================================
 
@@ -613,7 +616,7 @@ namespace INTERP_KERNEL
         getCorners( corners, &cornerBox->_minmax[0] );
 
         double globCorner[3];
-        for ( int iC = 0, nC = corners.size()/_dim; iC < nC; ++iC)
+        for ( std::size_t iC = 0, nC = corners.size()/_dim; iC < nC; ++iC)
           {
             cornerBox->fromLocalCS( &corners[iC*_dim], globCorner );
             mmBox.addPointToBox( globCorner );
@@ -645,7 +648,7 @@ namespace INTERP_KERNEL
       getCorners( cornersOther, box );
       DirectedBoundingBox mmBox((double*)0,0,_dim); //!< empty box with CS == this->_axes
       mmBox._axes = this->_axes;
-      for ( int iC = 0, nC = cornersOther.size()/_dim; iC < nC; ++iC)
+      for ( std::size_t iC = 0, nC = cornersOther.size()/_dim; iC < nC; ++iC)
         mmBox.addPointToBox( &cornersOther[iC*_dim] );
 
       if ( isMinMaxOut( &mmBox._minmax[0], &this->_minmax[0], _dim ))
@@ -658,7 +661,7 @@ namespace INTERP_KERNEL
       getCorners( cornersThis, &_minmax[0] );
       DirectedBoundingBox mmBox((double*)0,0,_dim); //!< initailized _minmax
       double globCorner[3];
-      for ( int iC = 0, nC = cornersThis.size()/_dim; iC < nC; ++iC)
+      for ( std::size_t iC = 0, nC = cornersThis.size()/_dim; iC < nC; ++iC)
         {
           fromLocalCS( &cornersThis[iC*_dim], globCorner );
           for ( int i = 0; i < (int)_dim; ++i )