cppcheck: can reduce the scope of these variables

This commit is contained in:
Caolán McNamara 2010-11-29 10:37:48 +00:00
parent 0a2c5d8be5
commit dc3c38d5a4

View file

@ -376,8 +376,6 @@ void CGM::ImplDoClass4()
case 0x0d : ComOut( CGM_LEVEL1 | CGM_EXTENDED_PRIMITIVES_SET, "Circular Arc 3 Point" )
{
int nSwitch = 0;
FloatPoint aStartingPoint, aIntermediatePoint, aEndingPoint, aCenterPoint;
ImplGetPoint( aStartingPoint, sal_True );
ImplGetPoint( aIntermediatePoint, sal_True );
@ -402,6 +400,8 @@ void CGM::ImplDoClass4()
double fInterAngle = ImplGetOrientation( aCenterPoint, aIntermediatePoint );
double fEndAngle = ImplGetOrientation( aCenterPoint, aEndingPoint );
int nSwitch = 0;
if ( fStartAngle > fEndAngle )
{
nSwitch ^=1;
@ -447,8 +447,6 @@ void CGM::ImplDoClass4()
case 0x0e : ComOut( CGM_LEVEL1 | CGM_EXTENDED_PRIMITIVES_SET, "Circular Arc 3 Point Close" )
{
int nSwitch = 0;
if ( mbFigure )
mpOutAct->CloseRegion();
@ -476,6 +474,8 @@ void CGM::ImplDoClass4()
double fInterAngle = ImplGetOrientation( aCenterPoint, aIntermediatePoint );
double fEndAngle = ImplGetOrientation( aCenterPoint, aEndingPoint );
int nSwitch = 0;
if ( fStartAngle > fEndAngle )
{
nSwitch ^=1;
@ -513,7 +513,7 @@ void CGM::ImplDoClass4()
case 0x0f : ComOut( CGM_LEVEL1 | CGM_EXTENDED_PRIMITIVES_SET, "Circular Arc Centre" )
{
double fOrientation, fStartAngle, fEndAngle, vector[ 4 ];
double fStartAngle, fEndAngle, vector[ 4 ];
FloatPoint aCenter, aRadius;
if ( mbFigure )
@ -557,7 +557,7 @@ void CGM::ImplDoClass4()
}
else
{
fOrientation = 0;
double fOrientation = 0;
mpOutAct->DrawEllipticalArc( aCenter, aRadius, fOrientation, 2, fStartAngle, fEndAngle );
}
mnParaSize = mnElementSize;