summaryrefslogtreecommitdiff
path: root/drawinglayer
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 /drawinglayer
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 'drawinglayer')
-rw-r--r--drawinglayer/source/primitive2d/textlayoutdevice.cxx4
-rw-r--r--drawinglayer/source/processor2d/vclprocessor2d.cxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index e15e9f826d77..aa8faeaf47a1 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -264,7 +264,7 @@ namespace drawinglayer
nIndex,
nLength,
0,
- &(aIntegerDXArray[0]));
+ aIntegerDXArray.data());
}
else
{
@@ -351,7 +351,7 @@ namespace drawinglayer
{
aRetval.reserve(nTextLength);
std::vector<long> aArray(nTextLength);
- mrDevice.GetTextArray(rText, &aArray[0], nIndex, nLength);
+ mrDevice.GetTextArray(rText, aArray.data(), nIndex, nLength);
aRetval.assign(aArray.begin(), aArray.end());
}
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 361f7a5bd5a3..9dcac098fe9c 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -265,7 +265,7 @@ namespace drawinglayer
sal_Int32 nPos = rTextCandidate.getTextPosition();
sal_Int32 nLen = rTextCandidate.getTextLength();
- long* pDXArray = !aTransformedDXArray.empty() ? &(aTransformedDXArray[0]) : nullptr ;
+ long* pDXArray = !aTransformedDXArray.empty() ? aTransformedDXArray.data() : nullptr ;
if ( rTextCandidate.isFilled() )
{