summaryrefslogtreecommitdiffstats
path: root/src/widgets/graphicsview
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2015-01-23 13:05:12 +0400
committerKonstantin Ritt <ritt.ks@gmail.com>2015-02-13 16:29:16 +0000
commit9b67d89c24666d405dd00e63bb56c924738aa002 (patch)
treebf0c0197b68097e9aace8ac3708dcbf0e3fe0c7c /src/widgets/graphicsview
parent22b5c39e8e0f4d8cb8a2b2d661e0451e01b75929 (diff)
Pass params of shareable type by const-ref rather than by value
...where passing them by value was not intentional. Change-Id: Ifd5036d57b41fddeeacfbd3f5890881605b80647 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/widgets/graphicsview')
-rw-r--r--src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp2
-rw-r--r--src/widgets/graphicsview/qsimplex_p.cpp2
-rw-r--r--src/widgets/graphicsview/qsimplex_p.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp b/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp
index 3462b6da9e..8327777217 100644
--- a/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp
+++ b/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp
@@ -2049,7 +2049,7 @@ void QGraphicsAnchorLayoutPrivate::calculateGraphs()
// ### Maybe getGraphParts could return the variables when traversing, at least
// for trunk...
-QList<AnchorData *> getVariables(QList<QSimplexConstraint *> constraints)
+QList<AnchorData *> getVariables(const QList<QSimplexConstraint *> &constraints)
{
QSet<AnchorData *> variableSet;
for (int i = 0; i < constraints.count(); ++i) {
diff --git a/src/widgets/graphicsview/qsimplex_p.cpp b/src/widgets/graphicsview/qsimplex_p.cpp
index ed63ee508d..1aeade6640 100644
--- a/src/widgets/graphicsview/qsimplex_p.cpp
+++ b/src/widgets/graphicsview/qsimplex_p.cpp
@@ -118,7 +118,7 @@ void QSimplex::clearDataStructures()
This method sets the new constraints, normalizes them, creates the simplex matrix
and runs the first simplex phase.
*/
-bool QSimplex::setConstraints(const QList<QSimplexConstraint *> newConstraints)
+bool QSimplex::setConstraints(const QList<QSimplexConstraint *> &newConstraints)
{
////////////////////////////
// Reset to initial state //
diff --git a/src/widgets/graphicsview/qsimplex_p.h b/src/widgets/graphicsview/qsimplex_p.h
index c731944ebb..2e98ca068b 100644
--- a/src/widgets/graphicsview/qsimplex_p.h
+++ b/src/widgets/graphicsview/qsimplex_p.h
@@ -149,7 +149,7 @@ public:
qreal solveMin();
qreal solveMax();
- bool setConstraints(const QList<QSimplexConstraint *> constraints);
+ bool setConstraints(const QList<QSimplexConstraint *> &constraints);
void setObjective(QSimplexConstraint *objective);
void dumpMatrix();