Cppcheck warning.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2016-12-14 11:32:22 +02:00
parent e86777d728
commit 62d3d5283a

View file

@ -193,7 +193,6 @@ void VTextManager::FitFontSize(qreal fW, qreal fH)
// get ratio between char width and height // get ratio between char width and height
int iMaxLen = 0; int iMaxLen = 0;
int iTW;
QFont fnt; QFont fnt;
for (int i = 0; i < GetSourceLinesCount(); ++i) for (int i = 0; i < GetSourceLinesCount(); ++i)
{ {
@ -203,7 +202,7 @@ void VTextManager::FitFontSize(qreal fW, qreal fH)
fnt.setWeight(tl.m_eFontWeight); fnt.setWeight(tl.m_eFontWeight);
fnt.setStyle(tl.m_eStyle); fnt.setStyle(tl.m_eStyle);
QFontMetrics fm(fnt); QFontMetrics fm(fnt);
iTW = fm.width(GetSourceLine(i).m_qsText); const int iTW = fm.width(GetSourceLine(i).m_qsText);
if (iTW > iMaxLen) if (iTW > iMaxLen)
{ {
iMaxLen = iTW; iMaxLen = iTW;