Commit e4b259dd authored by Jan Möbius's avatar Jan Möbius

cppcheck warning

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@17349 383ad7c9-94d9-4d36-a494-682f7c89f535
parent ee9ef785
......@@ -158,11 +158,10 @@ void Vec3DWidget::fromValue(QString _from)
void Vec3DWidget::editingFinished ()
{
bool ok;
float v;
for (int i = 0; i < 3; i++)
{
v = fields_[i]->text ().toFloat (&ok);
const float v = fields_[i]->text ().toFloat (&ok);
if (ok)
current_[i] = v;
......
......@@ -161,11 +161,10 @@ void Vec4DWidget::fromValue(QString _from)
void Vec4DWidget::editingFinished ()
{
bool ok;
float v;
for (int i = 0; i < 4; i++)
{
v = fields_[i]->text ().toFloat (&ok);
const float v = fields_[i]->text ().toFloat (&ok);
if (ok)
current_[i] = v;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment