From 33554c03b51a759851e20df8351655a5ec9af66c Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 27 Sep 2018 15:16:01 +0300 Subject: [PATCH] Clazy warning. --HG-- branch : release --- src/libs/vpatterndb/vpiece.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libs/vpatterndb/vpiece.cpp b/src/libs/vpatterndb/vpiece.cpp index 36eb04b13..7109ad833 100644 --- a/src/libs/vpatterndb/vpiece.cpp +++ b/src/libs/vpatterndb/vpiece.cpp @@ -699,6 +699,8 @@ void VPiece::SetPlaceLabels(const QVector &labels) QList VPiece::Dependencies() const { QList list = d->m_path.Dependencies(); + list.reserve(list.size() + d->m_customSARecords.size() + d->m_internalPaths.size() + d->m_pins.size() + + d->m_placeLabels.size()); for (auto &record : d->m_customSARecords) { @@ -914,6 +916,7 @@ QVector VPiece::GetUnitedPath(const VContainer *data) const QVector VPiece::GetValidRecords() const { QVector records; + records.reserve(d->m_customSARecords.size()); for (auto &record : d->m_customSARecords) { const int indexStartPoint = d->m_path.indexOfNode(record.startPoint); @@ -966,6 +969,7 @@ QVector VPiece::FilterRecords(QVector records) c records.remove(startIndex); QVector secondRound; + secondRound.reserve(records.size()); for (auto &record : records) { const int indexStartPoint = d->m_path.indexOfNode(record.startPoint);