diff options
author | Albert Astals Cid <albert.astals.cid@kdab.com> | 2019-10-04 14:13:36 +0200 |
---|---|---|
committer | Albert Astals Cid <albert.astals.cid@kdab.com> | 2019-10-07 09:09:49 +0200 |
commit | ce94b847c87e2606c5f189d2ad3715c1d025b9cf (patch) | |
tree | 94ccb94300d87ddafb465ce82c6f60601ce0749b /src/quick/handlers | |
parent | 2b371a50cbc1f54284fcea3834834ca58fc28fd0 (diff) |
Small performance improvements suggested by clang-tidy
mostly add const &, a few std::move and in particular case, remove const
so the std::move being done over the variable actually has effect
Change-Id: Id611cd31bc012f219d7a17d4626b1c2a5fbddd66
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/quick/handlers')
-rw-r--r-- | src/quick/handlers/qquickmultipointhandler.cpp | 2 | ||||
-rw-r--r-- | src/quick/handlers/qquickmultipointhandler_p.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/quick/handlers/qquickmultipointhandler.cpp b/src/quick/handlers/qquickmultipointhandler.cpp index 0afc9997aa..f404788de4 100644 --- a/src/quick/handlers/qquickmultipointhandler.cpp +++ b/src/quick/handlers/qquickmultipointhandler.cpp @@ -364,7 +364,7 @@ void QQuickMultiPointHandler::acceptPoints(const QVector<QQuickEventPoint *> &po point->setAccepted(); } -bool QQuickMultiPointHandler::grabPoints(QVector<QQuickEventPoint *> points) +bool QQuickMultiPointHandler::grabPoints(const QVector<QQuickEventPoint *> &points) { if (points.isEmpty()) return false; diff --git a/src/quick/handlers/qquickmultipointhandler_p.h b/src/quick/handlers/qquickmultipointhandler_p.h index eeb4b13b83..480f69035b 100644 --- a/src/quick/handlers/qquickmultipointhandler_p.h +++ b/src/quick/handlers/qquickmultipointhandler_p.h @@ -107,7 +107,7 @@ protected: QVector<PointData> angles(const QPointF &ref) const; static qreal averageAngleDelta(const QVector<PointData> &old, const QVector<PointData> &newAngles); void acceptPoints(const QVector<QQuickEventPoint *> &points); - bool grabPoints(QVector<QQuickEventPoint *> points); + bool grabPoints(const QVector<QQuickEventPoint *> &points); void moveTarget(QPointF pos); Q_DECLARE_PRIVATE(QQuickMultiPointHandler) |