diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-06-27 16:38:05 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-06-28 21:10:31 +0000 |
commit | 1a1ca59e2db9bd0e888bbae7806993fe03ee0153 (patch) | |
tree | a782c539521ce17ae5cabeeafede9c8636c0788d /src/widgets/graphicsview | |
parent | 26281561fec5bf850d32040dc16f5f8b5f1aa58f (diff) |
Make QGraphicsItemAnimationPrivate::Pair a (C++98) POD
There's no value in the ctor and it might be inhibiting some
C++98 POD-only compiler optimizations.
Change-Id: I6887afcd2af9805251eac2d8dfe4ced5b54bff85
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/widgets/graphicsview')
-rw-r--r-- | src/widgets/graphicsview/qgraphicsitemanimation.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/widgets/graphicsview/qgraphicsitemanimation.cpp b/src/widgets/graphicsview/qgraphicsitemanimation.cpp index 214a66ac41..f983da015c 100644 --- a/src/widgets/graphicsview/qgraphicsitemanimation.cpp +++ b/src/widgets/graphicsview/qgraphicsitemanimation.cpp @@ -116,7 +116,6 @@ public: qreal step; struct Pair { - Pair(qreal a, qreal b) : step(a), value(b) {} bool operator <(const Pair &other) const { return step < other.step; } bool operator==(const Pair &other) const @@ -174,7 +173,7 @@ void QGraphicsItemAnimationPrivate::insertUniquePair(qreal step, qreal value, QV if (!check_step_valid(step, method)) return; - Pair pair(step, value); + const Pair pair = { step, value }; const QVector<Pair>::iterator result = std::lower_bound(binList->begin(), binList->end(), pair); if ((result != binList->end()) && !(pair < *result)) |