summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@suse.com>2012-01-09 18:35:27 +0100
committerThorsten Behrens <tbehrens@suse.com>2012-01-09 18:38:09 +0100
commit53ec7e3b2c1e0fdcd72c30a36ede77319bab4969 (patch)
treef165285ab4d2637cdbfc374e4f9595fcf83f45a8 /canvas
parentc85142eb63c61de68aa7dbb10b2bcb8b48b870f9 (diff)
Avoid pointless const_cast, use getConstArray in all cases.
Another code-review follow-up fix from fdo#44533 - don't use Sequence::getArray, that tends to create a new copy everytime you call.
Diffstat (limited to 'canvas')
-rw-r--r--canvas/source/directx/dx_impltools.cxx4
-rw-r--r--canvas/source/vcl/textlayout.cxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/canvas/source/directx/dx_impltools.cxx b/canvas/source/directx/dx_impltools.cxx
index 946a9b20bbe5..63bcabee940e 100644
--- a/canvas/source/directx/dx_impltools.cxx
+++ b/canvas/source/directx/dx_impltools.cxx
@@ -452,8 +452,8 @@ namespace dxcanvas
// TODO(F1): Closed/open polygons
// convert from RealPoint2D array to Gdiplus::PointF array
- ::std::transform( const_cast< uno::Sequence< geometry::RealPoint2D >& >(points[nCurrPoly]).getArray(),
- const_cast< uno::Sequence< geometry::RealPoint2D >& >(points[nCurrPoly]).getArray()+nCurrSize,
+ ::std::transform( points[nCurrPoly].getConstArray(),
+ points[nCurrPoly].getConstArray()+nCurrSize,
aPoints.begin(),
implGdiPlusPointFromRealPoint2D );
diff --git a/canvas/source/vcl/textlayout.cxx b/canvas/source/vcl/textlayout.cxx
index 89711e5f7feb..4dd036f28360 100644
--- a/canvas/source/vcl/textlayout.cxx
+++ b/canvas/source/vcl/textlayout.cxx
@@ -465,8 +465,8 @@ namespace vclcanvas
renderState);
// fill integer offsets
- ::std::transform( const_cast< uno::Sequence< double >& >(inputOffsets).getConstArray(),
- const_cast< uno::Sequence< double >& >(inputOffsets).getConstArray()+inputOffsets.getLength(),
+ ::std::transform( inputOffsets.getConstArray(),
+ inputOffsets.getConstArray()+inputOffsets.getLength(),
outputOffsets,
OffsetTransformer( aMatrix ) );
}