Suppress memory allocation due to temporary container

Change-Id: I337c3f7ed63444ac0950a30298eb619f462b7a16
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
Sérgio Martins 2016-02-05 18:48:30 +00:00 committed by Marc Mutz
parent 588338b65b
commit d55b685d23

View File

@ -2239,7 +2239,7 @@ bool QGraphicsAnchorLayoutPrivate::calculateTrunk(Orientation orientation, const
Q_ASSERT(path.positives.count() == 1); Q_ASSERT(path.positives.count() == 1);
Q_ASSERT(path.negatives.count() == 0); Q_ASSERT(path.negatives.count() == 0);
AnchorData *ad = path.positives.toList()[0]; AnchorData *ad = *path.positives.cbegin();
ad->sizeAtMinimum = ad->minSize; ad->sizeAtMinimum = ad->minSize;
ad->sizeAtPreferred = ad->prefSize; ad->sizeAtPreferred = ad->prefSize;
ad->sizeAtMaximum = ad->maxSize; ad->sizeAtMaximum = ad->maxSize;