sdext/source/presenter/PresenterCanvasHelper.cxx | 7 +++---- sdext/source/presenter/PresenterWindowManager.cxx | 6 ++---- 2 files changed, 5 insertions(+), 8 deletions(-)
New commits: commit 86430b76d5833d85f54ccfdbf933162b59a261d9 Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Fri Oct 22 18:16:43 2021 +0200 Commit: Julien Nabet <serval2...@yahoo.fr> CommitDate: Fri Oct 22 19:17:50 2021 +0200 Revert part of "Simplify vector initialization in sdext" since it needs 2 allocations instead of one This partially reverts commit d64a6e2245169e5e4a3f8bc5388b4fff4984e5f4 . Change-Id: Iadd8193a02bd922105c082fe3bbcc6f8e9f96b22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124069 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2...@yahoo.fr> diff --git a/sdext/source/presenter/PresenterCanvasHelper.cxx b/sdext/source/presenter/PresenterCanvasHelper.cxx index 697a84d0a8ec..8381f8d5aabd 100644 --- a/sdext/source/presenter/PresenterCanvasHelper.cxx +++ b/sdext/source/presenter/PresenterCanvasHelper.cxx @@ -71,11 +71,10 @@ void PresenterCanvasHelper::PaintRectangle ( return; // Create a clip polypolygon that has the content box as hole. - ::std::vector<awt::Rectangle> aRectangles - { - PresenterGeometryHelper::Intersection(rRepaintBox, rOuterBoundingBox) - }; + ::std::vector<awt::Rectangle> aRectangles; aRectangles.reserve(2); + aRectangles.push_back( + PresenterGeometryHelper::Intersection(rRepaintBox, rOuterBoundingBox)); if (rContentBoundingBox.Width > 0 && rContentBoundingBox.Height > 0) aRectangles.push_back( PresenterGeometryHelper::Intersection(rRepaintBox, rContentBoundingBox)); diff --git a/sdext/source/presenter/PresenterWindowManager.cxx b/sdext/source/presenter/PresenterWindowManager.cxx index 9a541842286d..24115fa52523 100644 --- a/sdext/source/presenter/PresenterWindowManager.cxx +++ b/sdext/source/presenter/PresenterWindowManager.cxx @@ -989,11 +989,9 @@ Reference<rendering::XPolyPolygon2D> PresenterWindowManager::CreateClipPolyPolyg // Create a clip polygon that includes the whole update area but has the // content windows as holes. const sal_Int32 nPaneCount (mpPaneContainer->maPanes.size()); - ::std::vector<awt::Rectangle> aRectangles - { - mxParentWindow->getPosSize() - }; + ::std::vector<awt::Rectangle> aRectangles; aRectangles.reserve(1+nPaneCount); + aRectangles.push_back(mxParentWindow->getPosSize()); for (const auto& pDescriptor : mpPaneContainer->maPanes) { if ( ! pDescriptor->mbIsActive)