diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2019-07-20 20:03:15 +0300 |
---|---|---|
committer | Arkadiy Illarionov <qarkai@gmail.com> | 2019-07-22 18:42:35 +0200 |
commit | 6ffdc88e79904882e319bdd0b901e7491abae0b3 (patch) | |
tree | 5cb0257a03987f962668655af536a05ad72f8882 /svgio | |
parent | 803a6ccb774ff6dc67ca697459d6679e4bc9604f (diff) |
Simplify Sequence iterations in shell..svgio
Use range-based loops, STL and comphelper functions
Change-Id: I612d36abcc09a91c60f7212de6747a1a1bdcfc69
Reviewed-on: https://gerrit.libreoffice.org/76056
Tested-by: Jenkins
Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
Diffstat (limited to 'svgio')
-rw-r--r-- | svgio/qa/cppunit/SvgImportTest.cxx | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx index b3ef8abdd4d4..be3f719ab1d2 100644 --- a/svgio/qa/cppunit/SvgImportTest.cxx +++ b/svgio/qa/cppunit/SvgImportTest.cxx @@ -138,17 +138,9 @@ void Test::checkRectPrimitive(Primitive2DSequence const & rPrimitive) bool arePrimitive2DSequencesEqual(const Primitive2DSequence& rA, const Primitive2DSequence& rB) { - const sal_Int32 nCount(rA.getLength()); - - if(nCount != rB.getLength()) - return false; - - for(sal_Int32 a(0); a < nCount; a++) { - if(!drawinglayer::primitive2d::arePrimitive2DReferencesEqual(rA[a], rB[a])) - return false; - } - - return true; + return std::equal(rA.begin(), rA.end(), rB.begin(), rB.end(), + [](const Primitive2DReference& a, const Primitive2DReference& b) { + return drawinglayer::primitive2d::arePrimitive2DReferencesEqual(a, b); }); } // Attributes for an object (like rect as in this case) can be defined |