diff --git a/scene.cpp b/scene.cpp index 584be708c3..fa91f619f2 100644 --- a/scene.cpp +++ b/scene.cpp @@ -207,6 +207,7 @@ void Scene::paintGenericScreen(int orig_mask, ScreenPaintData) paintBackground(infiniteRegion()); } QVector phase2; + phase2.reserve(stacking_order.size()); foreach (Window * w, stacking_order) { // bottom to top Toplevel* topw = w->window(); @@ -250,6 +251,7 @@ void Scene::paintSimpleScreen(int orig_mask, QRegion region) assert((orig_mask & (PAINT_SCREEN_TRANSFORMED | PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS)) == 0); QVector phase2data; + phase2data.reserve(stacking_order.size()); QRegion dirtyArea = region; bool opaqueFullscreen(false);