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
// 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 );
......
......@@ -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 ) );
}
......
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