summaryrefslogtreecommitdiff
path: root/vcl/unx/generic
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 /vcl/unx/generic
parent7cf4bcef41448218f76fa1e974f541e13dc03023 (diff)
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 'vcl/unx/generic')
-rw-r--r--vcl/unx/generic/app/i18n_cb.cxx2
-rw-r--r--vcl/unx/generic/app/i18n_ic.cxx2
-rw-r--r--vcl/unx/generic/print/genprnpsp.cxx4
-rw-r--r--vcl/unx/generic/print/glyphset.cxx2
4 files changed, 5 insertions, 5 deletions
diff --git a/vcl/unx/generic/app/i18n_cb.cxx b/vcl/unx/generic/app/i18n_cb.cxx
index b683015fe5a5..3706df0b1a62 100644
--- a/vcl/unx/generic/app/i18n_cb.cxx
+++ b/vcl/unx/generic/app/i18n_cb.cxx
@@ -256,7 +256,7 @@ Preedit_FeedbackToSAL ( const XIMFeedback* pfeedback, int nlength, std::vector<E
if (nlength > 0 && nlength > sal::static_int_cast<int>(rSalAttr.size()) )
{
rSalAttr.reserve( nlength );
- psalattr = &rSalAttr[0];
+ psalattr = rSalAttr.data();
}
else
return nullptr;
diff --git a/vcl/unx/generic/app/i18n_ic.cxx b/vcl/unx/generic/app/i18n_ic.cxx
index ad7f408748b2..71f5ce6f604e 100644
--- a/vcl/unx/generic/app/i18n_ic.cxx
+++ b/vcl/unx/generic/app/i18n_ic.cxx
@@ -614,7 +614,7 @@ SalI18N_InputContext::EndExtTextInput()
if( ! aDel.isDeleted() )
{
// mark previous preedit state again (will e.g. be sent at focus gain)
- maClientData.aInputEv.mpTextAttr = &maClientData.aInputFlags[0];
+ maClientData.aInputEv.mpTextAttr = maClientData.aInputFlags.data();
if( static_cast<X11SalFrame*>(maClientData.pFrame)->hasFocus() )
{
// begin preedit again
diff --git a/vcl/unx/generic/print/genprnpsp.cxx b/vcl/unx/generic/print/genprnpsp.cxx
index baeaadc3541a..b1f73db275ea 100644
--- a/vcl/unx/generic/print/genprnpsp.cxx
+++ b/vcl/unx/generic/print/genprnpsp.cxx
@@ -1151,10 +1151,10 @@ bool PspSalPrinter::StartJob( const OUString* i_pFileName, const OUString& i_rJo
sal_uInt64 nBytesRead = 0;
do
{
- osl_readFile( pFile, &buffer[0], buffer.size(), &nBytesRead );
+ osl_readFile( pFile, buffer.data(), buffer.size(), &nBytesRead );
if( nBytesRead > 0 )
{
- size_t nBytesWritten = fwrite(&buffer[0], 1, nBytesRead, fp);
+ size_t nBytesWritten = fwrite(buffer.data(), 1, nBytesRead, fp);
OSL_ENSURE(nBytesRead == nBytesWritten, "short write");
if (nBytesRead != nBytesWritten)
break;
diff --git a/vcl/unx/generic/print/glyphset.cxx b/vcl/unx/generic/print/glyphset.cxx
index 522bb06f99c6..17555d7baf07 100644
--- a/vcl/unx/generic/print/glyphset.cxx
+++ b/vcl/unx/generic/print/glyphset.cxx
@@ -233,7 +233,7 @@ static void CreatePSUploadableFont( TrueTypeFont* pSrcFont, FILE* pTmpFile,
aInfo.LoadFont( pSrcFont );
aInfo.CreateFontSubset( nTargetMask, pTmpFile, pGlyphSetName,
- &aRequestedGlyphs[0], aEncoding.data(), nGlyphCount );
+ aRequestedGlyphs.data(), aEncoding.data(), nGlyphCount );
}
void