From 1a1ca59e2db9bd0e888bbae7806993fe03ee0153 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sat, 27 Jun 2015 16:38:05 +0200 Subject: [PATCH] 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) --- src/widgets/graphicsview/qgraphicsitemanimation.cpp | 3 +-- 1 file changed, 1 insertion(+), 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::iterator result = std::lower_bound(binList->begin(), binList->end(), pair); if ((result != binList->end()) && !(pair < *result))