summaryrefslogtreecommitdiffstats
path: root/cppuhelper
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-05-22 13:49:30 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-05-22 16:35:20 +0200
commitc18e2ea2a52fc171c50fcb22d431e94c6aececc5 (patch)
treea63721b18626947e5278a51feb7fd64604e80eee /cppuhelper
parentSpell out element access explicitly in test code (diff)
downloadcore-c18e2ea2a52fc171c50fcb22d431e94c6aececc5.tar.gz
core-c18e2ea2a52fc171c50fcb22d431e94c6aececc5.zip
New loplugin:data
...following up on 1453c2c8f13bac64ecd1981af7cebf1c421808ac "prefer vector::data to &vector[0]" Change-Id: I7c113747d92d144a521d49b89384dd8bf1215c01 Reviewed-on: https://gerrit.libreoffice.org/72765 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'cppuhelper')
-rw-r--r--cppuhelper/source/defaultbootstrap.cxx2
-rw-r--r--cppuhelper/source/propshlp.cxx2
-rw-r--r--cppuhelper/source/servicemanager.cxx4
3 files changed, 4 insertions, 4 deletions
diff --git a/cppuhelper/source/defaultbootstrap.cxx b/cppuhelper/source/defaultbootstrap.cxx
index c2d69990bf24..4796c92e9fa5 100644
--- a/cppuhelper/source/defaultbootstrap.cxx
+++ b/cppuhelper/source/defaultbootstrap.cxx
@@ -92,7 +92,7 @@ cppu::defaultBootstrap_InitialComponentContext(OUString const & iniUri)
true));
assert(!context_values.empty());
css::uno::Reference< css::uno::XComponentContext > context(
- createComponentContext(&context_values[0], context_values.size()));
+ createComponentContext(context_values.data(), context_values.size()));
smgr->setContext(context);
cppu::installTypeDescriptionManager(tmgr.get());
return context;
diff --git a/cppuhelper/source/propshlp.cxx b/cppuhelper/source/propshlp.cxx
index 312ad4411e79..d5f0da890bb7 100644
--- a/cppuhelper/source/propshlp.cxx
+++ b/cppuhelper/source/propshlp.cxx
@@ -589,7 +589,7 @@ void OPropertySetHelper::impl_fireAll( sal_Int32* i_handles, const Any* i_newVal
m_pReserved->m_oldValues.clear();
aGuard.clear();
- fire( &allHandles[0], &allNewValues[0], &allOldValues[0], additionalEvents + i_count, false );
+ fire( allHandles.data(), allNewValues.data(), allOldValues.data(), additionalEvents + i_count, false );
}
diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx
index 2118bcb00c88..d8fde789c429 100644
--- a/cppuhelper/source/servicemanager.cxx
+++ b/cppuhelper/source/servicemanager.cxx
@@ -1437,10 +1437,10 @@ OUString cppuhelper::ServiceManager::readLegacyRdbString(
}
OUString val;
std::vector< char > v(s); // assuming sal_uInt32 fits into vector::size_type
- if (subkey.getValue(OUString(), &v[0]) != RegError::NO_ERROR
+ if (subkey.getValue(OUString(), v.data()) != RegError::NO_ERROR
|| v.back() != '\0'
|| !rtl_convertStringToUString(
- &val.pData, &v[0], static_cast< sal_Int32 >(s - 1),
+ &val.pData, v.data(), static_cast< sal_Int32 >(s - 1),
RTL_TEXTENCODING_UTF8,
(RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR
| RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR