summaryrefslogtreecommitdiff
path: root/xmloff/source/transform
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-10-14 09:25:24 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2021-10-15 10:36:36 +0200
commit2484de6728bd11bb7949003d112f1ece2223c7a1 (patch)
tree1296534e396da284b38d2c478dcd2b31c4714179 /xmloff/source/transform
parent88375fd36899d21d3309cf8333712e02a87d3a91 (diff)
Remove non-const Sequence::begin()/end() in internal code
... to avoid hidden cost of multiple COW checks, because they call getArray() internally. This obsoletes [loplugin:sequenceloop]. Also rename toNonConstRange to asNonConstRange, to reflect that the result is a view of the sequence, not an independent object. TODO: also drop non-const operator[], but introduce operator[] in SequenceRange. Change-Id: Idd5fd7a3400fe65274d2a6343025e2ef8911635d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123518 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'xmloff/source/transform')
-rw-r--r--xmloff/source/transform/OOo2Oasis.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmloff/source/transform/OOo2Oasis.cxx b/xmloff/source/transform/OOo2Oasis.cxx
index 2a6111ca6256..2a853c430646 100644
--- a/xmloff/source/transform/OOo2Oasis.cxx
+++ b/xmloff/source/transform/OOo2Oasis.cxx
@@ -1932,7 +1932,7 @@ void OOo2OasisTransformer::Initialize(
{
Sequence<Any> aArgs( 1 + rArguments.getLength() );
aArgs[0] <<= xFilter;
- std::copy(rArguments.begin(), rArguments.end(), std::next(aArgs.begin()));
+ std::copy(rArguments.begin(), rArguments.end(), std::next(aArgs.getArray()));
XMLTransformerBase::initialize( aArgs );
OSL_ENSURE( GetDocHandler() == xFilter,