diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-08-21 18:21:48 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-22 18:54:08 +0200 |
commit | 4c5e264df432f4e6836535cbac7231ab579af424 (patch) | |
tree | 2c56b71dbaf5f3c587b34b75f4d85d06014d76e6 /vcl | |
parent | 008f28c9e01114e731f785e9e238236a1ed069d2 (diff) |
no need to use unique_ptr for PolyPolygon
it is already a COW type
Change-Id: If28f67bff3f8df7763bf4b574b1125d568f0ee27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120821
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/outdev/gradient.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx index 1250654d372d..ea10b6bcdf0a 100644 --- a/vcl/source/outdev/gradient.cxx +++ b/vcl/source/outdev/gradient.cxx @@ -457,7 +457,7 @@ void OutputDevice::DrawComplexGradient( const tools::Rectangle& rRect, // Also for printers always use PolyPolygon, as not all printers // can print polygons on top of each other. - std::unique_ptr<tools::PolyPolygon> xPolyPoly; + std::optional<tools::PolyPolygon> xPolyPoly; tools::Rectangle aRect; Point aCenter; Color aStartCol( rGradient.GetStartColor() ); @@ -476,7 +476,7 @@ void OutputDevice::DrawComplexGradient( const tools::Rectangle& rRect, rGradient.GetBoundRect( rRect, aRect, aCenter ); if ( UsePolyPolygonForComplexGradient() ) - xPolyPoly.reset(new tools::PolyPolygon( 2 )); + xPolyPoly = tools::PolyPolygon( 2 ); tools::Long nStepCount = GetGradientSteps( rGradient, rRect, false/*bMtf*/, true/*bComplex*/ ); @@ -807,7 +807,7 @@ void OutputDevice::DrawComplexGradientToMetafile( const tools::Rectangle& rRect, // Also for printers always use PolyPolygon, as not all printers // can print polygons on top of each other. - std::unique_ptr<tools::PolyPolygon> xPolyPoly; + std::optional<tools::PolyPolygon> xPolyPoly; tools::Rectangle aRect; Point aCenter; Color aStartCol( rGradient.GetStartColor() ); @@ -825,7 +825,7 @@ void OutputDevice::DrawComplexGradientToMetafile( const tools::Rectangle& rRect, rGradient.GetBoundRect( rRect, aRect, aCenter ); - xPolyPoly.reset(new tools::PolyPolygon( 2 )); + xPolyPoly = tools::PolyPolygon( 2 ); // last parameter - true if complex gradient, false if linear tools::Long nStepCount = GetGradientSteps( rGradient, rRect, true, true ); |