Add pointer qualifications to auto-typed variables that are deduced to pointers.
This commit is contained in:
parent
2134f969a0
commit
ff018a3f2c
|
@ -293,7 +293,7 @@ void VPLayoutFileWriter::WritePiece(const VPPiecePtr &piece)
|
||||||
|
|
||||||
writeStartElement(ML::TagSeamLine);
|
writeStartElement(ML::TagSeamLine);
|
||||||
QVector<VLayoutPoint> const contourPoints = piece->GetContourPoints();
|
QVector<VLayoutPoint> const contourPoints = piece->GetContourPoints();
|
||||||
for (auto &point : contourPoints)
|
for (const auto &point : contourPoints)
|
||||||
{
|
{
|
||||||
WriteLayoutPoint(point);
|
WriteLayoutPoint(point);
|
||||||
}
|
}
|
||||||
|
@ -307,7 +307,7 @@ void VPLayoutFileWriter::WritePiece(const VPPiecePtr &piece)
|
||||||
if (piece->IsSeamAllowance() && not piece->IsSeamAllowanceBuiltIn())
|
if (piece->IsSeamAllowance() && not piece->IsSeamAllowanceBuiltIn())
|
||||||
{
|
{
|
||||||
QVector<VLayoutPoint> const seamAllowancePoints = piece->GetSeamAllowancePoints();
|
QVector<VLayoutPoint> const seamAllowancePoints = piece->GetSeamAllowancePoints();
|
||||||
for (auto &point : seamAllowancePoints)
|
for (const auto &point : seamAllowancePoints)
|
||||||
{
|
{
|
||||||
WriteLayoutPoint(point);
|
WriteLayoutPoint(point);
|
||||||
}
|
}
|
||||||
|
@ -350,7 +350,7 @@ void VPLayoutFileWriter::WritePiece(const VPPiecePtr &piece)
|
||||||
[](bool mirrored) noexcept { return mirrored; });
|
[](bool mirrored) noexcept { return mirrored; });
|
||||||
|
|
||||||
QVector<VLayoutPoint> const points = path.Points();
|
QVector<VLayoutPoint> const points = path.Points();
|
||||||
for (auto &point : points)
|
for (const auto &point : points)
|
||||||
{
|
{
|
||||||
WriteLayoutPoint(point);
|
WriteLayoutPoint(point);
|
||||||
}
|
}
|
||||||
|
|
|
@ -313,7 +313,7 @@ void DialogMDataBase::InitDataBase(const QStringList &usedMeasurements)
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList const groups = knownDB.Groups();
|
QStringList const groups = knownDB.Groups();
|
||||||
for (auto &group : groups)
|
for (const auto &group : groups)
|
||||||
{
|
{
|
||||||
QMap<int, VKnownMeasurement> const groupMeasurements = knownDB.OrderedGroupMeasurements(group);
|
QMap<int, VKnownMeasurement> const groupMeasurements = knownDB.OrderedGroupMeasurements(group);
|
||||||
m_groups.append(InitGroup(group, groupMeasurements, usedMeasurements));
|
m_groups.append(InitGroup(group, groupMeasurements, usedMeasurements));
|
||||||
|
|
|
@ -212,7 +212,7 @@ void DialogHistory::FillTable()
|
||||||
|
|
||||||
QVector<HistoryRecord> const historyRecords = QtConcurrent::blockingMapped(history, CreateRecord);
|
QVector<HistoryRecord> const historyRecords = QtConcurrent::blockingMapped(history, CreateRecord);
|
||||||
|
|
||||||
for (auto &record : historyRecords)
|
for (const auto &record : historyRecords)
|
||||||
{
|
{
|
||||||
if (not record.description.isEmpty())
|
if (not record.description.isEmpty())
|
||||||
{
|
{
|
||||||
|
|
|
@ -1040,7 +1040,7 @@ void VDxfEngine::ExportAAMAIntcut(const QSharedPointer<dx_ifaceBlock> &detailBlo
|
||||||
};
|
};
|
||||||
|
|
||||||
QVector<VLayoutPiecePath> const drawIntCut = detail.MappedInternalPathsForCut(true);
|
QVector<VLayoutPiecePath> const drawIntCut = detail.MappedInternalPathsForCut(true);
|
||||||
for (auto &intCut : drawIntCut)
|
for (const auto &intCut : drawIntCut)
|
||||||
{
|
{
|
||||||
QVector<VLayoutPoint> points = intCut.Points();
|
QVector<VLayoutPoint> points = intCut.Points();
|
||||||
DrawPolygon(points, false);
|
DrawPolygon(points, false);
|
||||||
|
@ -1615,7 +1615,7 @@ void VDxfEngine::ExportASTMInternalCutout(const QSharedPointer<dx_ifaceBlock> &d
|
||||||
};
|
};
|
||||||
|
|
||||||
QVector<VLayoutPiecePath> const drawIntCut = detail.MappedInternalPathsForCut(true);
|
QVector<VLayoutPiecePath> const drawIntCut = detail.MappedInternalPathsForCut(true);
|
||||||
for (auto &intCut : drawIntCut)
|
for (const auto &intCut : drawIntCut)
|
||||||
{
|
{
|
||||||
QVector<VLayoutPoint> points = intCut.Points();
|
QVector<VLayoutPoint> points = intCut.Points();
|
||||||
DrawPolygon(points, intCut.IsNotMirrored(), false);
|
DrawPolygon(points, intCut.IsNotMirrored(), false);
|
||||||
|
|
|
@ -154,7 +154,7 @@ auto VAbstartMeasurementDimension::ValidBasesList() const -> QStringList
|
||||||
QVector<qreal> const bases = ValidBases();
|
QVector<qreal> const bases = ValidBases();
|
||||||
QStringList list;
|
QStringList list;
|
||||||
list.reserve(bases.size());
|
list.reserve(bases.size());
|
||||||
for(auto &base : bases)
|
for (const auto &base : bases)
|
||||||
{
|
{
|
||||||
list.append(QString::number(base));
|
list.append(QString::number(base));
|
||||||
}
|
}
|
||||||
|
@ -382,7 +382,7 @@ void VDimensionRestriction::SetExcludeString(const QString &exclude)
|
||||||
m_exclude.clear();
|
m_exclude.clear();
|
||||||
|
|
||||||
QStringList const values = exclude.split(';');
|
QStringList const values = exclude.split(';');
|
||||||
for(auto &value : values)
|
for (const auto &value : values)
|
||||||
{
|
{
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
qreal const val = value.toDouble(&ok);
|
qreal const val = value.toDouble(&ok);
|
||||||
|
@ -400,7 +400,7 @@ auto VDimensionRestriction::GetExcludeString() const -> QString
|
||||||
QList<qreal> const list = m_exclude.values();
|
QList<qreal> const list = m_exclude.values();
|
||||||
QStringList excludeList;
|
QStringList excludeList;
|
||||||
|
|
||||||
for(auto &value : list)
|
for (const auto &value : list)
|
||||||
{
|
{
|
||||||
excludeList.append(QString::number(value));
|
excludeList.append(QString::number(value));
|
||||||
}
|
}
|
||||||
|
|
|
@ -758,7 +758,7 @@ auto VPatternRecipe::SplinePath(const VToolRecord &record) -> QDomElement
|
||||||
throw VExceptionInvalidHistory(QObject::tr("Empty list of nodes for tool with id '%1'.").arg(record.getId()));
|
throw VExceptionInvalidHistory(QObject::tr("Empty list of nodes for tool with id '%1'.").arg(record.getId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto &pathNode : path)
|
for (const auto &pathNode : path)
|
||||||
{
|
{
|
||||||
QDomElement node = createElement(QStringLiteral("node"));
|
QDomElement node = createElement(QStringLiteral("node"));
|
||||||
|
|
||||||
|
@ -804,7 +804,7 @@ auto VPatternRecipe::CubicBezierPath(const VToolRecord &record) -> QDomElement
|
||||||
throw VExceptionInvalidHistory(QObject::tr("Empty list of nodes for tool with id '%1'.").arg(record.getId()));
|
throw VExceptionInvalidHistory(QObject::tr("Empty list of nodes for tool with id '%1'.").arg(record.getId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto &pathNode : path)
|
for (const auto &pathNode : path)
|
||||||
{
|
{
|
||||||
QDomElement node = createElement(QStringLiteral("node"));
|
QDomElement node = createElement(QStringLiteral("node"));
|
||||||
|
|
||||||
|
@ -1217,7 +1217,7 @@ auto VPatternRecipe::GroupOperationSource(VAbstractOperation *tool, quint32 id,
|
||||||
throw VExceptionInvalidHistory(QObject::tr("Empty list of nodes for tool with id '%1'.").arg(id));
|
throw VExceptionInvalidHistory(QObject::tr("Empty list of nodes for tool with id '%1'.").arg(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto &item : items)
|
for (const auto &item : items)
|
||||||
{
|
{
|
||||||
QDomElement node = createElement(QStringLiteral("node"));
|
QDomElement node = createElement(QStringLiteral("node"));
|
||||||
|
|
||||||
|
|
|
@ -357,7 +357,7 @@ auto VBoundary::InsertDisconnect(QList<VBoundarySequenceItemData> &sequence, int
|
||||||
}
|
}
|
||||||
|
|
||||||
QVector<QVector<VLayoutPoint>> const shape = PreparePassmarkShape(passmark, drawMode, item.mirror);
|
QVector<QVector<VLayoutPoint>> const shape = PreparePassmarkShape(passmark, drawMode, item.mirror);
|
||||||
for (auto &subShape : shape)
|
for (const auto &subShape : shape)
|
||||||
{
|
{
|
||||||
sequence.insert(i, PrepareSequenceItem(subShape, drawMode, VBoundarySequenceItem::PassmarkShape));
|
sequence.insert(i, PrepareSequenceItem(subShape, drawMode, VBoundarySequenceItem::PassmarkShape));
|
||||||
}
|
}
|
||||||
|
|
|
@ -247,7 +247,7 @@ auto VPosition::ArrangeDetail(const VPositionData &data, std::atomic_bool *stop,
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<VBestSquare> const results = watcher.future().results();
|
QList<VBestSquare> const results = watcher.future().results();
|
||||||
for (auto &result : results)
|
for (const auto &result : results)
|
||||||
{
|
{
|
||||||
bestResult.NewResult(result);
|
bestResult.NewResult(result);
|
||||||
}
|
}
|
||||||
|
|
|
@ -266,7 +266,7 @@ auto VPiece::PassmarksLines(const VContainer *data) const -> QVector<QLineF>
|
||||||
{
|
{
|
||||||
QVector<VPassmark> const passmarks = Passmarks(data);
|
QVector<VPassmark> const passmarks = Passmarks(data);
|
||||||
QVector<QLineF> lines;
|
QVector<QLineF> lines;
|
||||||
for (auto &passmark : passmarks)
|
for (const auto &passmark : passmarks)
|
||||||
{
|
{
|
||||||
if (not passmark.IsNull())
|
if (not passmark.IsNull())
|
||||||
{
|
{
|
||||||
|
@ -1211,7 +1211,7 @@ auto VPiece::IsPassmarkVisible(const QVector<VPieceNode> &path, vsizetype passma
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto &record : records)
|
for (const auto &record : records)
|
||||||
{
|
{
|
||||||
if (record.includeType == PiecePathIncludeType::AsCustomSA)
|
if (record.includeType == PiecePathIncludeType::AsCustomSA)
|
||||||
{
|
{
|
||||||
|
|
|
@ -842,7 +842,7 @@ auto VPiecePath::Edge(quint32 p1, quint32 p2) const -> vsizetype
|
||||||
auto VPiecePath::ListNodePoint() const -> QVector<VPieceNode>
|
auto VPiecePath::ListNodePoint() const -> QVector<VPieceNode>
|
||||||
{
|
{
|
||||||
QVector<VPieceNode> list;
|
QVector<VPieceNode> list;
|
||||||
for (auto &node : d->m_nodes) //-const V807
|
for (const auto &node : d->m_nodes) //-const V807
|
||||||
{
|
{
|
||||||
if (node.GetTypeTool() == Tool::NodePoint)
|
if (node.GetTypeTool() == Tool::NodePoint)
|
||||||
{
|
{
|
||||||
|
|
|
@ -469,7 +469,7 @@ auto AbstractTest::CopyRecursively(const QString &srcFilePath, const QString &tg
|
||||||
QDir const sourceDir(srcFilePath);
|
QDir const sourceDir(srcFilePath);
|
||||||
const QStringList fileNames =
|
const QStringList fileNames =
|
||||||
sourceDir.entryList(QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot | QDir::Hidden | QDir::System);
|
sourceDir.entryList(QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot | QDir::Hidden | QDir::System);
|
||||||
for (auto &fileName : fileNames)
|
for (const auto &fileName : fileNames)
|
||||||
{
|
{
|
||||||
const QString newSrcFilePath = srcFilePath + QDir::separator() + fileName;
|
const QString newSrcFilePath = srcFilePath + QDir::separator() + fileName;
|
||||||
const QString newTgtFilePath = tgtFilePath + QDir::separator() + fileName;
|
const QString newTgtFilePath = tgtFilePath + QDir::separator() + fileName;
|
||||||
|
|
|
@ -333,7 +333,7 @@ void DialogFlippingByAxis::SuffixChanged()
|
||||||
{
|
{
|
||||||
QRegularExpression const rx(NameRegExp());
|
QRegularExpression const rx(NameRegExp());
|
||||||
const QStringList uniqueNames = data->AllUniqueNames();
|
const QStringList uniqueNames = data->AllUniqueNames();
|
||||||
for (auto &uniqueName : uniqueNames)
|
for (const auto &uniqueName : uniqueNames)
|
||||||
{
|
{
|
||||||
const QString name = uniqueName + suffix;
|
const QString name = uniqueName + suffix;
|
||||||
if (not rx.match(name).hasMatch() || not data->IsUnique(name))
|
if (not rx.match(name).hasMatch() || not data->IsUnique(name))
|
||||||
|
|
|
@ -355,7 +355,7 @@ void DialogFlippingByLine::SuffixChanged()
|
||||||
{
|
{
|
||||||
QRegularExpression const rx(NameRegExp());
|
QRegularExpression const rx(NameRegExp());
|
||||||
const QStringList uniqueNames = data->AllUniqueNames();
|
const QStringList uniqueNames = data->AllUniqueNames();
|
||||||
for (auto &uniqueName : uniqueNames)
|
for (const auto &uniqueName : uniqueNames)
|
||||||
{
|
{
|
||||||
const QString name = uniqueName + suffix;
|
const QString name = uniqueName + suffix;
|
||||||
if (not rx.match(name).hasMatch() || not data->IsUnique(name))
|
if (not rx.match(name).hasMatch() || not data->IsUnique(name))
|
||||||
|
|
|
@ -4864,7 +4864,7 @@ auto DialogSeamAllowance::GetDefaultPieceName() const -> QString
|
||||||
QList<VPiece> const pieces = data->DataPieces()->values();
|
QList<VPiece> const pieces = data->DataPieces()->values();
|
||||||
QSet<QString> names;
|
QSet<QString> names;
|
||||||
|
|
||||||
for (auto &piece : pieces)
|
for (const auto &piece : pieces)
|
||||||
{
|
{
|
||||||
names.insert(piece.GetName());
|
names.insert(piece.GetName());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user