From 5a74c4bf63b07ff53b093e4630150acdc6021beb Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sun, 3 Feb 2019 15:58:35 +0200 Subject: [PATCH] Cppcheck warnings. --HG-- branch : develop --- src/libs/vtools/tools/vtooluniondetails.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/libs/vtools/tools/vtooluniondetails.cpp b/src/libs/vtools/tools/vtooluniondetails.cpp index 9dc65b5ca..261a2cfc4 100644 --- a/src/libs/vtools/tools/vtooluniondetails.cpp +++ b/src/libs/vtools/tools/vtooluniondetails.cpp @@ -1593,10 +1593,9 @@ void CreateUnitedDetail(const VToolUnionDetailsInitData &initData, qreal dx, qre initPieceData.detail = initData.data->GetPiece(id); initPieceData.width = initPieceData.detail.GetFormulaSAWidth(); - VToolSeamAllowance *piece = VToolSeamAllowance::Duplicate(initPieceData); - if (piece != nullptr) + if (VToolSeamAllowance *duplicate = VToolSeamAllowance::Duplicate(initPieceData)) { - piece->RefreshGeometry(true); // Refresh internal paths + duplicate->RefreshGeometry(true); // Refresh internal paths } }; @@ -1907,9 +1906,9 @@ QVector VToolUnionDetails::GetReferenceObjects() const case 4://VToolSeamAllowance::TagPlaceLabels { const QDomNodeList children = element.childNodes(); - for (qint32 i = 0; i < children.size(); ++i) + for (qint32 index = 0; index < children.size(); ++index) { - const QDomElement record = children.at(i).toElement(); + const QDomElement record = children.at(index).toElement(); if (not record.isNull() && record.tagName() == VToolSeamAllowance::TagRecord) { list.append(record.text().toUInt());