From 7886b6a56a51cb699fb2a18d8a8dff0e224bdfb5 Mon Sep 17 00:00:00 2001 From: Ramreiso Kashung Date: Thu, 30 Dec 2021 14:23:45 +0530 Subject: tdf#145538 : Using range-based for loops Change-Id: I9674eff3e2572ffef7ee19af12befc8a9b6b1c06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127734 Tested-by: Jenkins Reviewed-by: Hossein --- drawinglayer/source/primitive2d/animatedprimitive2d.cxx | 4 ++-- drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'drawinglayer/source') diff --git a/drawinglayer/source/primitive2d/animatedprimitive2d.cxx b/drawinglayer/source/primitive2d/animatedprimitive2d.cxx index 5873ee69a51f..67349a83425a 100644 --- a/drawinglayer/source/primitive2d/animatedprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/animatedprimitive2d.cxx @@ -132,9 +132,9 @@ namespace drawinglayer::primitive2d const sal_uInt32 nCount(rmMatrixStack.size()); maMatrixStack.reserve(nCount); - for(sal_uInt32 a(0); a < nCount; a++) + for(const auto& a : rmMatrixStack) { - maMatrixStack.emplace_back(rmMatrixStack[a]); + maMatrixStack.emplace_back(a); } } diff --git a/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx b/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx index ab66cb223a66..eb5711307bea 100644 --- a/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx @@ -51,9 +51,9 @@ namespace drawinglayer::primitive2d // use half size for expand aLogicHalfSize *= 0.5; - for(sal_uInt32 a(0); a < nMarkerCount; a++) + for(const auto& a : rPositions) { - const basegfx::B2DPoint& rPosition(rPositions[a]); + const basegfx::B2DPoint& rPosition(a); const basegfx::B2DRange aRange(rPosition - aLogicHalfSize, rPosition + aLogicHalfSize); basegfx::B2DHomMatrix aTransform; -- cgit