[Libreoffice-commits] core.git: basegfx/source include/basegfx
Julien Nabet (via logerrit)
logerrit at kemper.freedesktop.org
Tue Dec 3 11:30:47 UTC 2019
basegfx/source/range/b2dpolyrange.cxx | 10 +++++-----
include/basegfx/range/b2dpolyrange.hxx | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
New commits:
commit f51fddc2e7cfa2a2118610a3fc4b02886544d0a9
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Mon Dec 2 21:04:23 2019 +0100
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Dec 3 12:29:35 2019 +0100
Simplify a bit B2DPolyRange::appendElement (basegfx)
push_back is more optimized than an insert
Change-Id: I8932c4ee61569b5eee3d5dbc5fbfd8eff624d061
Reviewed-on: https://gerrit.libreoffice.org/84276
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/basegfx/source/range/b2dpolyrange.cxx b/basegfx/source/range/b2dpolyrange.cxx
index f5ead1641d15..21905e408167 100644
--- a/basegfx/source/range/b2dpolyrange.cxx
+++ b/basegfx/source/range/b2dpolyrange.cxx
@@ -52,10 +52,10 @@ namespace basegfx
return std::make_tuple(maRanges[nIndex], maOrient[nIndex]);
}
- void appendElement(const B2DRange& rRange, B2VectorOrientation eOrient, sal_uInt32 nCount)
+ void appendElement(const B2DRange& rRange, B2VectorOrientation eOrient)
{
- maRanges.insert(maRanges.end(), nCount, rRange);
- maOrient.insert(maOrient.end(), nCount, eOrient);
+ maRanges.push_back(rRange);
+ maOrient.push_back(eOrient);
maBounds.expand(rRange);
}
@@ -130,9 +130,9 @@ namespace basegfx
return mpImpl->getElement(nIndex);
}
- void B2DPolyRange::appendElement(const B2DRange& rRange, B2VectorOrientation eOrient, sal_uInt32 nCount)
+ void B2DPolyRange::appendElement(const B2DRange& rRange, B2VectorOrientation eOrient)
{
- mpImpl->appendElement(rRange, eOrient, nCount );
+ mpImpl->appendElement(rRange, eOrient);
}
void B2DPolyRange::clear()
diff --git a/include/basegfx/range/b2dpolyrange.hxx b/include/basegfx/range/b2dpolyrange.hxx
index e6de924057df..e4d68e8a0986 100644
--- a/include/basegfx/range/b2dpolyrange.hxx
+++ b/include/basegfx/range/b2dpolyrange.hxx
@@ -70,7 +70,7 @@ namespace basegfx
ElementType getElement(sal_uInt32 nIndex) const;
// insert/append a single range
- void appendElement(const B2DRange& rRange, B2VectorOrientation eOrient, sal_uInt32 nCount = 1);
+ void appendElement(const B2DRange& rRange, B2VectorOrientation eOrient);
void clear();
More information about the Libreoffice-commits
mailing list