Kaydet (Commit) 53ec7e3b authored tarafından Thorsten Behrens's avatar Thorsten Behrens

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.
üst c85142eb
...@@ -452,8 +452,8 @@ namespace dxcanvas ...@@ -452,8 +452,8 @@ namespace dxcanvas
// TODO(F1): Closed/open polygons // TODO(F1): Closed/open polygons
// convert from RealPoint2D array to Gdiplus::PointF array // convert from RealPoint2D array to Gdiplus::PointF array
::std::transform( const_cast< uno::Sequence< geometry::RealPoint2D >& >(points[nCurrPoly]).getArray(), ::std::transform( points[nCurrPoly].getConstArray(),
const_cast< uno::Sequence< geometry::RealPoint2D >& >(points[nCurrPoly]).getArray()+nCurrSize, points[nCurrPoly].getConstArray()+nCurrSize,
aPoints.begin(), aPoints.begin(),
implGdiPlusPointFromRealPoint2D ); implGdiPlusPointFromRealPoint2D );
......
...@@ -465,8 +465,8 @@ namespace vclcanvas ...@@ -465,8 +465,8 @@ namespace vclcanvas
renderState); renderState);
// fill integer offsets // fill integer offsets
::std::transform( const_cast< uno::Sequence< double >& >(inputOffsets).getConstArray(), ::std::transform( inputOffsets.getConstArray(),
const_cast< uno::Sequence< double >& >(inputOffsets).getConstArray()+inputOffsets.getLength(), inputOffsets.getConstArray()+inputOffsets.getLength(),
outputOffsets, outputOffsets,
OffsetTransformer( aMatrix ) ); OffsetTransformer( aMatrix ) );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment