diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-23 16:00:56 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-24 09:04:23 +0200 |
commit | 9f529c2bbfc1b331a3037cdd2bf25363389ab032 (patch) | |
tree | fcf541649b024e379c15f58c2d942069aa05f65a /vcl | |
parent | e8e558488217b8d2c381191389f2a785aaa5ca27 (diff) |
loplugin:useuniqueptr in BitmapScaleConvolutionFilter
Change-Id: If83aecb555b3b73b2e4fd19ecfa782236bc546e6
Reviewed-on: https://gerrit.libreoffice.org/59507
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/BitmapScaleConvolutionFilter.hxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/vcl/inc/BitmapScaleConvolutionFilter.hxx b/vcl/inc/BitmapScaleConvolutionFilter.hxx index 6b4642eb6455..bb5fb38409e1 100644 --- a/vcl/inc/BitmapScaleConvolutionFilter.hxx +++ b/vcl/inc/BitmapScaleConvolutionFilter.hxx @@ -21,6 +21,7 @@ #define VCL_INC_BITMAPSCALECONVOLUTIONFILTER_HXX #include <vcl/BitmapFilter.hxx> +#include <o3tl/make_unique.hxx> #include "ResampleKernel.hxx" @@ -29,8 +30,8 @@ namespace vcl class VCL_DLLPUBLIC BitmapScaleConvolutionFilter : public BitmapFilter { protected: - BitmapScaleConvolutionFilter(const double& rScaleX, const double& rScaleY, Kernel* pKernel) - : mxKernel(pKernel) + BitmapScaleConvolutionFilter(const double& rScaleX, const double& rScaleY, std::unique_ptr<Kernel> pKernel) + : mxKernel(std::move(pKernel)) , mrScaleX(rScaleX) , mrScaleY(rScaleY) { @@ -48,7 +49,7 @@ class VCL_DLLPUBLIC BitmapScaleBilinearFilter : public BitmapScaleConvolutionFil { public: BitmapScaleBilinearFilter(const double& rScaleX, const double& rScaleY) - : BitmapScaleConvolutionFilter(rScaleX, rScaleY, new BilinearKernel) + : BitmapScaleConvolutionFilter(rScaleX, rScaleY, o3tl::make_unique<BilinearKernel>()) { } }; @@ -57,7 +58,7 @@ class VCL_DLLPUBLIC BitmapScaleBicubicFilter : public BitmapScaleConvolutionFilt { public: BitmapScaleBicubicFilter(const double& rScaleX, const double& rScaleY) - : BitmapScaleConvolutionFilter(rScaleX, rScaleY, new BicubicKernel) + : BitmapScaleConvolutionFilter(rScaleX, rScaleY, o3tl::make_unique<BicubicKernel>()) { } }; @@ -66,7 +67,7 @@ class VCL_DLLPUBLIC BitmapScaleLanczos3Filter : public BitmapScaleConvolutionFil { public: BitmapScaleLanczos3Filter(const double& rScaleX, const double& rScaleY) - : BitmapScaleConvolutionFilter(rScaleX, rScaleY, new Lanczos3Kernel) + : BitmapScaleConvolutionFilter(rScaleX, rScaleY, o3tl::make_unique<Lanczos3Kernel>()) { } }; |