diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-04-12 16:38:26 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-04-12 20:33:06 +0200 |
commit | 1453c2c8f13bac64ecd1981af7cebf1c421808ac (patch) | |
tree | 7246d310899dea0c499cfe04addcb57e4776a4d0 /sw/source/filter/ww8/wrtww8.cxx | |
parent | f7d8e3318044bb70647424a1eea354bc59e4ced5 (diff) |
prefer vector::data to &vector[0]
probably missed loads more
Change-Id: I53c9fe188055ef925fed54500e64b837cd56a1e7
Reviewed-on: https://gerrit.libreoffice.org/70676
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/filter/ww8/wrtww8.cxx')
-rw-r--r-- | sw/source/filter/ww8/wrtww8.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index c737156568d9..094e6b3ec68c 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -1774,7 +1774,7 @@ void SwWW8Writer::WriteString16(SvStream& rStrm, const OUString& rStr, //vectors are guaranteed to have contiguous memory, so we can do //this while migrating away from WW8Bytes. Meyers Effective STL, item 16 if (!aBytes.empty()) - rStrm.WriteBytes(&aBytes[0], aBytes.size()); + rStrm.WriteBytes(aBytes.data(), aBytes.size()); } void SwWW8Writer::WriteString_xstz(SvStream& rStrm, const OUString& rStr, bool bAddZero) @@ -1784,7 +1784,7 @@ void SwWW8Writer::WriteString_xstz(SvStream& rStrm, const OUString& rStr, bool b SwWW8Writer::InsAsString16(aBytes, rStr); if (bAddZero) SwWW8Writer::InsUInt16(aBytes, 0); - rStrm.WriteBytes(&aBytes[0], aBytes.size()); + rStrm.WriteBytes(aBytes.data(), aBytes.size()); } void SwWW8Writer::WriteString8(SvStream& rStrm, const OUString& rStr, @@ -1797,7 +1797,7 @@ void SwWW8Writer::WriteString8(SvStream& rStrm, const OUString& rStr, //vectors are guaranteed to have contiguous memory, so we can do ////this while migrating away from WW8Bytes. Meyers Effective STL, item 16 if (!aBytes.empty()) - rStrm.WriteBytes(&aBytes[0], aBytes.size()); + rStrm.WriteBytes(aBytes.data(), aBytes.size()); } void WW8Export::WriteStringAsPara( const OUString& rText ) |