CppCheck : Reduced variable scope

This commit is contained in:
Magne Sjaastad
2017-03-24 09:30:36 +01:00
parent 8137955add
commit 03741fd7da

View File

@@ -107,7 +107,6 @@ QSize RiuNightchartsWidget::sizeHint() const
{
int widthHint = 0;
int heightHint = 0;
int maxPieSize = 180;
if ( m_showLegend )
{
@@ -122,6 +121,8 @@ QSize RiuNightchartsWidget::sizeHint() const
if (m_showPie)
{
int maxPieSize = 180;
widthHint = widthHint + maxPieSize;
heightHint = heightHint > maxPieSize ? heightHint : maxPieSize;
}