From fb4d935ac467b2136447e1f8322311ba4f321287 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 22 Oct 2018 14:42:13 +0300 Subject: [PATCH] Clazy warnings. --HG-- branch : develop --- src/libs/vlayout/vlayoutpiece.cpp | 4 +++- src/libs/vlayout/vlayoutpiece.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libs/vlayout/vlayoutpiece.cpp b/src/libs/vlayout/vlayoutpiece.cpp index da7c63278..9f068a0a4 100644 --- a/src/libs/vlayout/vlayoutpiece.cpp +++ b/src/libs/vlayout/vlayoutpiece.cpp @@ -306,6 +306,7 @@ QVector CorrectPosition(const QRectF &parentBoundingRect, QVector PrepareAllowance(const QVector &points) { QVector allowancePoints; + allowancePoints.reserve(points.size()); for(auto point : points) { allowancePoints.append(VSAPoint(point)); @@ -474,6 +475,7 @@ template <> QVector VLayoutPiece::Map(const QVector &points) const { QVector p; + p.reserve(points.size()); for (auto &label : points) { VLayoutPlaceLabel mappedLabel; @@ -726,7 +728,7 @@ qreal VLayoutPiece::GetLayoutWidth() const } //--------------------------------------------------------------------------------------------------------------------- -void VLayoutPiece::SetLayoutWidth(const qreal &value) +void VLayoutPiece::SetLayoutWidth(qreal value) { d->layoutWidth = value; } diff --git a/src/libs/vlayout/vlayoutpiece.h b/src/libs/vlayout/vlayoutpiece.h index c5a357c2e..34fe5de9d 100644 --- a/src/libs/vlayout/vlayoutpiece.h +++ b/src/libs/vlayout/vlayoutpiece.h @@ -109,7 +109,7 @@ public: void SetMatrix(const QTransform &matrix); qreal GetLayoutWidth() const; - void SetLayoutWidth(const qreal &value); + void SetLayoutWidth(qreal value); bool IsMirror() const; void SetMirror(bool value);