1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-03 14:10:33 +03:00

0024167: Compiler warnings 'unreacheable code' and 'conditional expression is constant' in MOA

Resolved some C4702 (unreachable code) and C4127 (conditional expression is constant).

small corrections in NoSuchObject invoking.

Macros names changing, deadcode deleting, re-writing "for" loops into equivalent "if" structures.

changed condition in "if" block, deadcode deleted.

Small changes in else statement.
This commit is contained in:
aml
2013-10-03 14:07:10 +04:00
committed by bugmaster
parent d9ec7d1d09
commit 3ed30348aa
7 changed files with 46 additions and 28 deletions

View File

@@ -739,7 +739,7 @@ void Add(const TopoDS_Shape& aS,
Handle(BOPInt_Context)& theContext)
{
Standard_Boolean bIsDone, bHasFirstPoint, bHasSecondPoint;
Standard_Integer iErr, aIx, aNbDomains, i;
Standard_Integer iErr, aIx, aNbDomains;
Standard_Real aUMin, aUMax, aVMin, aVMax;
Standard_Real aVx = 0., aUx, aV1, aV2, aEpsT;
gp_Dir2d aD2D (0., 1.);
@@ -783,8 +783,8 @@ void Add(const TopoDS_Shape& aS,
}
//
aNbDomains=aHatcher.NbDomains(aIx);
for (i=1; i<=aNbDomains; ++i) {
const HatchGen_Domain& aDomain=aHatcher.Domain (aIx, i) ;
if (aNbDomains > 0) {
const HatchGen_Domain& aDomain=aHatcher.Domain (aIx, 1) ;
bHasFirstPoint=aDomain.HasFirstPoint();
if (!bHasFirstPoint) {
iErr=3;
@@ -803,7 +803,10 @@ void Add(const TopoDS_Shape& aS,
//
aVx=IntTools_Tools::IntermediatePoint(aV1, aV2);
//
break;
}
else {
iErr=2;
return iErr;
}
//
aS->D0(aUx, aVx, aPx);