diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-05-06 19:57:48 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-06 21:52:00 +0200 |
commit | 18715f6a63af55045b108b98abeffeae8e51518b (patch) | |
tree | 7cfcc6fc8a27c6f0c023d74fac5e43b88ac70907 /stoc | |
parent | b83a8483a1426ba400480d33f7df321fcc02e64d (diff) |
remove unnecessary sequenceToContainer
If we are not going to manipulate the resulting vector, then it is
actually slower, since we have to allocate more storage for the vector
Change-Id: I65677007d105f4783603df74113ebed6db0b551b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133963
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'stoc')
-rw-r--r-- | stoc/source/simpleregistry/simpleregistry.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/stoc/source/simpleregistry/simpleregistry.cxx b/stoc/source/simpleregistry/simpleregistry.cxx index 0b7fae2b8641..6291889a3733 100644 --- a/stoc/source/simpleregistry/simpleregistry.cxx +++ b/stoc/source/simpleregistry/simpleregistry.cxx @@ -315,9 +315,8 @@ css::uno::Sequence< sal_Int32 > Key::getLongListValue() void Key::setLongListValue(css::uno::Sequence< sal_Int32 > const & seqValue) { std::scoped_lock guard(registry_->mutex_); - auto list = comphelper::sequenceToContainer<std::vector<sal_Int32>>(seqValue); RegError err = key_.setLongListValue( - OUString(), list.data(), static_cast< sal_uInt32 >(list.size())); + OUString(), seqValue.getConstArray(), static_cast< sal_uInt32 >(seqValue.getLength())); if (err != RegError::NO_ERROR) { throw css::registry::InvalidRegistryException( "com.sun.star.registry.SimpleRegistry key setLongListValue:" |