compiler warning fixed

This commit is contained in:
Uwe Rathmann 2017-10-25 10:41:34 +02:00
parent 7322f431cc
commit 19b64d5b97

View File

@ -320,32 +320,6 @@ namespace
m_corner = corner;
const auto& c = metrics.corner[ corner ];
bool horizontal;
switch( corner )
{
case Qt::TopLeftCorner:
{
horizontal = m_clockwise;
break;
}
case Qt::BottomRightCorner:
{
horizontal = m_clockwise;
break;
}
case Qt::TopRightCorner:
{
horizontal = !m_clockwise;
break;
}
case Qt::BottomLeftCorner:
{
horizontal = !m_clockwise;
break;
}
}
const double angleStep = M_PI_2 / c.stepCount;
m_cosStep = qFastCos( angleStep );
@ -353,6 +327,12 @@ namespace
m_stepInv1 = m_sinStep / m_cosStep;
m_stepInv2 = m_cosStep + m_sinStep * m_stepInv1;
bool horizontal;
if ( corner == Qt::TopRightCorner || corner == Qt::BottomLeftCorner )
horizontal = !m_clockwise;
else
horizontal = m_clockwise;
if ( horizontal )
{
m_cos = 1.0;