From 10cc0f3d2ddaa5d7f6ee18042dacfc67c1be96af Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 7 Feb 2024 09:07:09 +0200 Subject: simplify some Primitive2DContainer accesses Change-Id: I217489db2f66049dfb0908f2f2a07a2f585302ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163070 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svgio/source/svgreader/svgtextpathnode.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'svgio/source') diff --git a/svgio/source/svgreader/svgtextpathnode.cxx b/svgio/source/svgreader/svgtextpathnode.cxx index 9ccdb93f599d..ee197f9d68fd 100644 --- a/svgio/source/svgreader/svgtextpathnode.cxx +++ b/svgio/source/svgreader/svgtextpathnode.cxx @@ -393,13 +393,12 @@ namespace svgio::svgreader if(fPosition < 0.0) return; - const sal_Int32 nLength(rPathContent.size()); - sal_Int32 nCurrent(0); + auto pathContentIt = rPathContent.begin(); - while(fPosition < fBasegfxPathLength && nCurrent < nLength) + while(fPosition < fBasegfxPathLength && pathContentIt != rPathContent.end()) { const drawinglayer::primitive2d::TextSimplePortionPrimitive2D* pCandidate = nullptr; - const drawinglayer::primitive2d::Primitive2DReference xReference(rPathContent[nCurrent]); + const drawinglayer::primitive2d::Primitive2DReference xReference(*pathContentIt); if(xReference.is()) { @@ -427,7 +426,7 @@ namespace svgio::svgreader fPosition = aPathTextBreakupHelper.getPosition(); } - nCurrent++; + ++pathContentIt; } } -- cgit v1.2.3