0026584: Eliminate compile warnings obtained by building occt with vc14: declaration...
authorski <ski@opencascade.com>
Tue, 18 Aug 2015 11:47:04 +0000 (14:47 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 10 Sep 2015 13:55:58 +0000 (16:55 +0300)
Eliminated warning "declaration of variable hides class member"

src/NCollection/NCollection_CellFilter.hxx
src/math/math_GlobOptMin.cxx

index 9c6dfac..fdc923c 100644 (file)
@@ -291,8 +291,8 @@ protected:
     //! Assignment operator: ensure that list is not deleted twice
     void operator = (const Cell& theOther)
     {
-      Standard_Integer myDim = Standard_Integer(theOther.index.Size());
-      for(Standard_Integer anIdx = 0; anIdx < myDim; anIdx++)
+      Standard_Integer aDim = Standard_Integer(theOther.index.Size());
+      for(Standard_Integer anIdx = 0; anIdx < aDim; anIdx++)
         index[anIdx] = theOther.index[anIdx];
 
       Objects = theOther.Objects;
@@ -311,8 +311,8 @@ protected:
     //! Compare cell with other one
     Standard_Boolean IsEqual (const Cell& theOther) const
     {
-      Standard_Integer myDim = Standard_Integer(theOther.index.Size());
-      for (int i=0; i < myDim; i++) 
+      Standard_Integer aDim = Standard_Integer(theOther.index.Size());
+      for (int i=0; i < aDim; i++) 
         if ( index[i] != theOther.index[i] ) return Standard_False;
       return Standard_True;
     }
@@ -321,10 +321,10 @@ protected:
     Standard_Integer HashCode (const Standard_Integer theUpper) const
     {
       // number of bits per each dimension in the hash code
-      Standard_Integer myDim = Standard_Integer(index.Size());
-      const Standard_Size aShiftBits = (BITS(long)-1) / myDim;
+      Standard_Integer aDim = Standard_Integer(index.Size());
+      const Standard_Size aShiftBits = (BITS(long)-1) / aDim;
       long aCode=0;
-      for (int i=0; i < myDim; i++)
+      for (int i=0; i < aDim; i++)
         aCode = ( aCode << aShiftBits ) ^ index[i];
       return (unsigned)aCode % theUpper;
     }
index 7261b63..99e968d 100644 (file)
@@ -266,11 +266,11 @@ Standard_Boolean math_GlobOptMin::computeLocalExtremum(const math_Vector& thePnt
   //Newton method
   if (dynamic_cast<math_MultipleVarFunctionWithHessian*>(myFunc))
   {
-    math_MultipleVarFunctionWithHessian* myTmp = 
+    math_MultipleVarFunctionWithHessian* aTmp = 
       dynamic_cast<math_MultipleVarFunctionWithHessian*> (myFunc);
-    math_NewtonMinimum newtonMinimum(*myTmp);
+    math_NewtonMinimum newtonMinimum(*aTmp);
     newtonMinimum.SetBoundary(myGlobA, myGlobB);
-    newtonMinimum.Perform(*myTmp, thePnt);
+    newtonMinimum.Perform(*aTmp, thePnt);
 
     if (newtonMinimum.IsDone())
     {
@@ -283,10 +283,10 @@ Standard_Boolean math_GlobOptMin::computeLocalExtremum(const math_Vector& thePnt
   // BFGS method used.
   if (dynamic_cast<math_MultipleVarFunctionWithGradient*>(myFunc))
   {
-    math_MultipleVarFunctionWithGradient* myTmp = 
+    math_MultipleVarFunctionWithGradient* aTmp =
       dynamic_cast<math_MultipleVarFunctionWithGradient*> (myFunc);
-    math_BFGS bfgs(myTmp->NbVariables());
-    bfgs.Perform(*myTmp, thePnt);
+    math_BFGS bfgs(aTmp->NbVariables());
+    bfgs.Perform(*aTmp, thePnt);
     if (bfgs.IsDone())
     {
       bfgs.Location(theOutPnt);