1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-06 18:26:22 +03:00

0024821: CLang warning -Wunsequenced in StdSelect_ViewerSelector3d

This commit is contained in:
kgv 2014-04-10 16:16:27 +04:00 committed by apn
parent 2cb4424136
commit d7515f9afb

View File

@ -795,30 +795,31 @@ void StdSelect_ViewerSelector3d::ComputeSensitivePrs (const Handle(SelectMgr_Sel
//circle //circle
if (SubEnt->DynamicType()==STANDARD_TYPE(Select3D_SensitiveCircle)) if (SubEnt->DynamicType()==STANDARD_TYPE(Select3D_SensitiveCircle))
{ {
Handle(Select3D_SensitiveCircle) C = Handle(Select3D_SensitiveCircle)::DownCast(SubEnt); Handle(Select3D_SensitiveCircle) aCircle = Handle(Select3D_SensitiveCircle)::DownCast(SubEnt);
Standard_Integer Lo, Up; Standard_Integer aFrom, aTo;
C->ArrayBounds (Lo, Up); aCircle->ArrayBounds (aFrom, aTo);
Standard_Integer II = Lo; aTo -= 2;
while (II <= Up - 2) for (Standard_Integer aPntIter = aFrom; aPntIter <= aTo; aPntIter += 2)
{ {
gp_Pnt ThePts[3] = gp_Pnt aPnts[3] =
{ {
gp_Pnt (C->GetPoint3d (II).XYZ()), gp_Pnt (aCircle->GetPoint3d (aPntIter + 0).XYZ()),
gp_Pnt (C->GetPoint3d (++II).XYZ()), gp_Pnt (aCircle->GetPoint3d (aPntIter + 1).XYZ()),
gp_Pnt (C->GetPoint3d (++II).XYZ()) gp_Pnt (aCircle->GetPoint3d (aPntIter + 2).XYZ())
}; };
if (hasloc) if (hasloc)
{ {
for (Standard_Integer jj = 0; jj <= 2; jj++) aPnts[0].Transform (theloc.Transformation());
ThePts[jj].Transform (theloc.Transformation()); aPnts[1].Transform (theloc.Transformation());
aPnts[2].Transform (theloc.Transformation());
} }
aSeqBnds.Append (4); aSeqBnds.Append (4);
aSeqLines.Append(ThePts[0]); aSeqLines.Append (aPnts[0]);
aSeqLines.Append(ThePts[1]); aSeqLines.Append (aPnts[1]);
aSeqLines.Append(ThePts[2]); aSeqLines.Append (aPnts[2]);
aSeqLines.Append(ThePts[0]); aSeqLines.Append (aPnts[0]);
} }
} }
@ -862,30 +863,31 @@ void StdSelect_ViewerSelector3d::ComputeSensitivePrs (const Handle(SelectMgr_Sel
//============= //=============
else if (Ent->DynamicType()==STANDARD_TYPE(Select3D_SensitiveCircle)) else if (Ent->DynamicType()==STANDARD_TYPE(Select3D_SensitiveCircle))
{ {
Handle(Select3D_SensitiveCircle) C = Handle(Select3D_SensitiveCircle)::DownCast(Ent); Handle(Select3D_SensitiveCircle) aCircle = Handle(Select3D_SensitiveCircle)::DownCast(Ent);
Standard_Integer Lo, Up; Standard_Integer aFrom, aTo;
C->ArrayBounds (Lo, Up); aCircle->ArrayBounds (aFrom, aTo);
Standard_Integer II = Lo; aTo -= 2;
while (II <= Up - 2) for (Standard_Integer aPntIter = aFrom; aPntIter <= aTo; aPntIter += 2)
{ {
gp_Pnt ThePts[3] = gp_Pnt aPnts[3] =
{ {
gp_Pnt (C->GetPoint3d (II).XYZ()), gp_Pnt (aCircle->GetPoint3d (aPntIter + 0).XYZ()),
gp_Pnt (C->GetPoint3d (++II).XYZ()), gp_Pnt (aCircle->GetPoint3d (aPntIter + 1).XYZ()),
gp_Pnt (C->GetPoint3d (++II).XYZ()) gp_Pnt (aCircle->GetPoint3d (aPntIter + 2).XYZ())
}; };
if (hasloc) if (hasloc)
{ {
for (Standard_Integer jj = 0; jj <= 2; jj++) aPnts[0].Transform (theloc.Transformation());
ThePts[jj].Transform (theloc.Transformation()); aPnts[1].Transform (theloc.Transformation());
aPnts[2].Transform (theloc.Transformation());
} }
aSeqBnds.Append (4); aSeqBnds.Append (4);
aSeqLines.Append(ThePts[0]); aSeqLines.Append (aPnts[0]);
aSeqLines.Append(ThePts[1]); aSeqLines.Append (aPnts[1]);
aSeqLines.Append(ThePts[2]); aSeqLines.Append (aPnts[2]);
aSeqLines.Append(ThePts[0]); aSeqLines.Append (aPnts[0]);
} }
} }
//============== //==============