summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2009-10-07 13:16:09 (GMT)
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2009-10-07 13:30:53 (GMT)
commit97005819172157c9d178bc338013488d22102bd9 (patch)
treed7cf85adf4775f6de95b930f791524e178c66266 /src/gui/graphicsview
parentd65daa20e4a1df1479378fa166871dc2cf0e8612 (diff)
downloadQt-97005819172157c9d178bc338013488d22102bd9.zip
Qt-97005819172157c9d178bc338013488d22102bd9.tar.gz
Qt-97005819172157c9d178bc338013488d22102bd9.tar.bz2
Using const refs for passing qreal will make Qt slower on some systems.
For instance, if sizeof(qreal) == 4 (for instance on ARM) the stack size needed will be the same, so it will just add an extra indirection.
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r--src/gui/graphicsview/qgraphicsanchorlayout_p.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp
index 34071cc..e3cd4f9 100644
--- a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp
+++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp
@@ -275,8 +275,8 @@ static qreal getFactor(qreal value, qreal min, qreal pref, qreal max)
}
}
-static qreal getExpandingFactor(const qreal &expSize, const qreal &sizeAtPreferred,
- const qreal &sizeAtExpanding, const qreal &sizeAtMaximum)
+static qreal getExpandingFactor(qreal expSize, qreal sizeAtPreferred,
+ qreal sizeAtExpanding, qreal sizeAtMaximum)
{
const qreal lower = qMin(sizeAtPreferred, sizeAtMaximum);
const qreal upper = qMax(sizeAtPreferred, sizeAtMaximum);