]> OCCT Git - occt.git/commitdiff
Coding - Resolving C6287 & C6282 warnings
authordpasukhi <dpasukhi@opencascade.com>
Mon, 9 Sep 2024 18:57:50 +0000 (18:57 +0000)
committerdpasukhi <dpasukhi@opencascade.com>
Sat, 14 Sep 2024 15:16:54 +0000 (15:16 +0000)
Removing redundant code and incorrect operator

src/FEmTool/FEmTool_ProfileMatrix.cxx
src/ViewerTest/ViewerTest_ViewerCommands.cxx

index 1f4e900454518612e86328590dc6711d0f29068b..15c7681ab5a1192ed580720205fb0d5e4cc49e9c 100644 (file)
@@ -108,7 +108,7 @@ FEmTool_ProfileMatrix::FEmTool_ProfileMatrix(const TColStd_Array1OfInteger& Firs
   SMA--;
   const Standard_Real * PM = &ProfileMatrix->Value(1);
   PM--;
-
+  IsDecomp = Standard_False;
   for(j = 1; j <= RowNumber(); j++) {
     DiagAddr = profile(2, j);
     Kj = j - profile(1, j);
@@ -118,7 +118,7 @@ FEmTool_ProfileMatrix::FEmTool_ProfileMatrix(const TColStd_Array1OfInteger& Firs
 
     a = PM[DiagAddr] - Sum;
     if(a < Eps) {
-      return IsDecomp = Standard_False;// Matrix is not positive defined
+      return Standard_False;// Matrix is not positive defined
     }
     a = Sqrt(a);
     SMA[DiagAddr] = a;
@@ -139,7 +139,8 @@ FEmTool_ProfileMatrix::FEmTool_ProfileMatrix(const TColStd_Array1OfInteger& Firs
       SMA[CurrAddr] = (PM[CurrAddr] - Sum)/a;
     }
   }
-  return IsDecomp = Standard_True;
+  IsDecomp = Standard_True;
+  return IsDecomp;
 }
 
 //=======================================================================
index 630ac437f4c09d3c56c5cd05c0b14e3d8ace9d15..ef3f96aa707806ea4ea9aaa9d4ab5ff9872f89fc 100644 (file)
@@ -12619,8 +12619,7 @@ static int VManipulator (Draw_Interpretor& theDi,
     {
       anAttachOptions.SetAdjustSize (Draw::ParseOnOffNoIterator (theArgsNb, theArgVec, anArgIter) ? 1 : 0);
     }
-    else if (anArg == "-enablemodes"
-          || anArg == "-enablemodes")
+    else if (anArg == "-enablemodes")
     {
       anAttachOptions.SetEnableModes (Draw::ParseOnOffNoIterator (theArgsNb, theArgVec, anArgIter) ? 1 : 0);
     }