diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-10-01 10:12:30 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-10-01 13:20:30 +0200 |
commit | a3e29642b9c118674ad88785500ce164aa103de9 (patch) | |
tree | cc56b0087f4e3529b75865f6bad0f9e5a2119f1d /shell | |
parent | 720af01132d9e623389b82b5251c1687240d3569 (diff) |
loplugin:data (clang-cl)
Change-Id: Ib8b2bc1c5f7b27a646036ce23cae2b6a06edd038
Reviewed-on: https://gerrit.libreoffice.org/79922
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'shell')
-rw-r--r-- | shell/source/win32/ooofilereader/basereader.cxx | 2 | ||||
-rw-r--r-- | shell/source/win32/simplemail/senddoc.cxx | 4 | ||||
-rw-r--r-- | shell/source/win32/simplemail/smplmailclient.cxx | 2 | ||||
-rw-r--r-- | shell/source/win32/zipfile/zipfile.cxx | 8 |
4 files changed, 8 insertions, 8 deletions
diff --git a/shell/source/win32/ooofilereader/basereader.cxx b/shell/source/win32/ooofilereader/basereader.cxx index e0b1558c1c7b..7bf53b2752cd 100644 --- a/shell/source/win32/ooofilereader/basereader.cxx +++ b/shell/source/win32/ooofilereader/basereader.cxx @@ -67,7 +67,7 @@ void CBaseReader::Initialize( const std::string& ContentName) { xml_parser parser; parser.set_document_handler(this); // pass current reader as reader to the sax parser - parser.parse(&m_ZipContent[0], m_ZipContent.size(), true/*IsFinal*/); + parser.parse(m_ZipContent.data(), m_ZipContent.size(), true/*IsFinal*/); } } catch(std::exception&) diff --git a/shell/source/win32/simplemail/senddoc.cxx b/shell/source/win32/simplemail/senddoc.cxx index a7a87fdb2a25..3b57684fe821 100644 --- a/shell/source/win32/simplemail/senddoc.cxx +++ b/shell/source/win32/simplemail/senddoc.cxx @@ -162,10 +162,10 @@ static void initMapiMessage( pMapiMessage->lpszSubject = const_cast<wchar_t*>(gSubject.c_str()); pMapiMessage->lpszNoteText = (gBody.length() ? const_cast<wchar_t*>(gBody.c_str()) : nullptr); pMapiMessage->lpOriginator = aMapiOriginator; - pMapiMessage->lpRecips = aMapiRecipientList.size() ? &aMapiRecipientList[0] : nullptr; + pMapiMessage->lpRecips = aMapiRecipientList.size() ? aMapiRecipientList.data() : nullptr; pMapiMessage->nRecipCount = aMapiRecipientList.size(); if (!aMapiAttachmentList.empty()) - pMapiMessage->lpFiles = &aMapiAttachmentList[0]; + pMapiMessage->lpFiles = aMapiAttachmentList.data(); pMapiMessage->nFileCount = aMapiAttachmentList.size(); } diff --git a/shell/source/win32/simplemail/smplmailclient.cxx b/shell/source/win32/simplemail/smplmailclient.cxx index 1466d3f86228..7b225d16975b 100644 --- a/shell/source/win32/simplemail/smplmailclient.cxx +++ b/shell/source/win32/simplemail/smplmailclient.cxx @@ -136,7 +136,7 @@ namespace /* private */ an array of pointers to rtl_uString's */ oslProcessError err = osl_executeProcess( senddocUrl.pData, - const_cast<rtl_uString**>(reinterpret_cast<rtl_uString * const *>(&rCommandArgs[0])), + const_cast<rtl_uString**>(reinterpret_cast<rtl_uString * const *>(rCommandArgs.data())), rCommandArgs.size(), nProcOption, nullptr, diff --git a/shell/source/win32/zipfile/zipfile.cxx b/shell/source/win32/zipfile/zipfile.cxx index 9de4b047a976..13f79a041018 100644 --- a/shell/source/win32/zipfile/zipfile.cxx +++ b/shell/source/win32/zipfile/zipfile.cxx @@ -464,7 +464,7 @@ void ZipFile::GetUncompressedContent( ContentBuffer.clear(); ContentBuffer = ZipContentBuffer_t(entry.uncompressed_size); if (!entry.compression) - m_pStream->sread(reinterpret_cast<unsigned char *>(&ContentBuffer[0]), entry.uncompressed_size); + m_pStream->sread(reinterpret_cast<unsigned char *>(ContentBuffer.data()), entry.uncompressed_size); else { int ret; @@ -481,14 +481,14 @@ void ZipFile::GetUncompressedContent( return; std::vector<unsigned char> tmpBuffer(entry.compressed_size); - if (entry.compressed_size != m_pStream->sread(&tmpBuffer[0], entry.compressed_size)) + if (entry.compressed_size != m_pStream->sread(tmpBuffer.data(), entry.compressed_size)) return; strm.avail_in = entry.compressed_size; - strm.next_in = reinterpret_cast<Bytef *>(&tmpBuffer[0]); + strm.next_in = reinterpret_cast<Bytef *>(tmpBuffer.data()); strm.avail_out = entry.uncompressed_size; - strm.next_out = reinterpret_cast<Bytef *>(&ContentBuffer[0]); + strm.next_out = reinterpret_cast<Bytef *>(ContentBuffer.data()); ret = inflate(&strm, Z_FINISH); switch (ret) { |