erase vector instead of clearing it to preserve the pre-allocated memory

CCBUG: 299594
REVIEW: 104897
icc-effect-5.14.5
Thomas Lübking 2012-05-08 19:13:09 +02:00
parent 601243e549
commit ee53114054
1 changed files with 1 additions and 1 deletions

View File

@ -655,7 +655,7 @@ void Toplevel::damageNotifyEvent(XDamageNotifyEvent* e)
const float area = rect().width()*rect().height();
damageRects.reserve(16);
damageRects.clear();
damageRects.erase(damageRects.begin(), damageRects.end());
damageRects << QRect(e->area.x, e->area.y, e->area.width, e->area.height);
// we can not easily say anything about the overall ratio since the new rects may intersect the present