summaryrefslogtreecommitdiffstats
path: root/stoc/source/simpleregistry/simpleregistry.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'stoc/source/simpleregistry/simpleregistry.cxx')
-rw-r--r--stoc/source/simpleregistry/simpleregistry.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/stoc/source/simpleregistry/simpleregistry.cxx b/stoc/source/simpleregistry/simpleregistry.cxx
index ac520ccc58d3..0c20d6b5d0bc 100644
--- a/stoc/source/simpleregistry/simpleregistry.cxx
+++ b/stoc/source/simpleregistry/simpleregistry.cxx
@@ -313,7 +313,9 @@ void Key::setLongListValue(css::uno::Sequence< sal_Int32 > const & seqValue)
{
osl::MutexGuard guard(registry_->mutex_);
std::vector< sal_Int32 > list;
- for (sal_Int32 i = 0; i < seqValue.getLength(); ++i) {
+ list.reserve(seqValue.getLength());
+ for (sal_Int32 i = 0; i < seqValue.getLength(); ++i)
+ {
list.push_back(seqValue[i]);
}
RegError err = key_.setLongListValue(
@@ -613,7 +615,9 @@ void Key::setStringListValue(
{
osl::MutexGuard guard(registry_->mutex_);
std::vector< sal_Unicode * > list;
- for (sal_Int32 i = 0; i < seqValue.getLength(); ++i) {
+ list.reserve(seqValue.getLength());
+ for (sal_Int32 i = 0; i < seqValue.getLength(); ++i)
+ {
list.push_back(const_cast< sal_Unicode * >(seqValue[i].getStr()));
}
RegError err = key_.setUnicodeListValue(