Skip to content

Commit

Permalink
Coding - Resolving C6287 & C6282 warnings
Browse files Browse the repository at this point in the history
Removing redundant code and incorrect operator
  • Loading branch information
dpasukhi committed Sep 9, 2024
1 parent ed20837 commit 784f91c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/FEmTool/FEmTool_ProfileMatrix.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
Expand All @@ -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;
}

//=======================================================================
Expand Down
3 changes: 1 addition & 2 deletions src/ViewerTest/ViewerTest_ViewerCommands.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 784f91c

Please sign in to comment.