diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-02-24 14:09:52 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-02-24 15:48:51 +0000 |
commit | 3a74745367a73ed9351379fc32bbe9253cdae697 (patch) | |
tree | 0fec3ca84576a0f51e4f48cdda82b67e7282c3ab /oox/source | |
parent | c9126dfbabcde1bf8b157942a5f5134ad547b957 (diff) |
vector::data seems more natural than &vector::front
Change-Id: I0ce48075ad186cf1f9bd3e13fa76269fa9819af1
Diffstat (limited to 'oox/source')
-rw-r--r-- | oox/source/dump/dumperbase.cxx | 4 | ||||
-rw-r--r-- | oox/source/helper/binaryinputstream.cxx | 2 | ||||
-rw-r--r-- | oox/source/ole/vbainputstream.cxx | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx index 373e665cd14a..a4fca11906a8 100644 --- a/oox/source/dump/dumperbase.cxx +++ b/oox/source/dump/dumperbase.cxx @@ -2144,9 +2144,9 @@ OUString InputObjectBase::dumpCharArray( const String& rName, sal_Int32 nLen, rt if( nDumpSize > 0 ) { ::std::vector< sal_Char > aBuffer( static_cast< std::size_t >( nLen ) + 1 ); - sal_Int32 nCharsRead = mxStrm->readMemory( &aBuffer.front(), nLen ); + sal_Int32 nCharsRead = mxStrm->readMemory(aBuffer.data(), nLen); aBuffer[ nCharsRead ] = 0; - aString = OStringToOUString( OString( &aBuffer.front() ), eTextEnc ); + aString = OStringToOUString(OString(aBuffer.data()), eTextEnc); } if( bHideTrailingNul ) aString = StringHelper::trimTrailingNul( aString ); diff --git a/oox/source/helper/binaryinputstream.cxx b/oox/source/helper/binaryinputstream.cxx index e3f300a604df..5a568dc68c49 100644 --- a/oox/source/helper/binaryinputstream.cxx +++ b/oox/source/helper/binaryinputstream.cxx @@ -66,7 +66,7 @@ OString BinaryInputStream::readCharArray( sal_Int32 nChars, bool bAllowNulChars if( !bAllowNulChars ) ::std::replace( aBuffer.begin(), aBuffer.end(), '\0', '?' ); - return OString( reinterpret_cast< sal_Char* >( &aBuffer.front() ), nCharsRead ); + return OString(reinterpret_cast<sal_Char*>(aBuffer.data()), nCharsRead); } OUString BinaryInputStream::readCharArrayUC( sal_Int32 nChars, rtl_TextEncoding eTextEnc, bool bAllowNulChars ) diff --git a/oox/source/ole/vbainputstream.cxx b/oox/source/ole/vbainputstream.cxx index e3c545231e73..0e9262ceab04 100644 --- a/oox/source/ole/vbainputstream.cxx +++ b/oox/source/ole/vbainputstream.cxx @@ -194,7 +194,7 @@ bool VbaInputStream::updateChunk() else { maChunk.resize( nChunkLen ); - mpInStrm->readMemory( &maChunk.front(), nChunkLen ); + mpInStrm->readMemory(maChunk.data(), nChunkLen); } // decompression sometimes leaves the stream pos offset 1 place ( at // least ) past or before the expected stream pos. |