diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-04-17 10:21:05 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-04-17 14:09:26 +0200 |
commit | 5d35d01dc79c5af817e8a78dfddef35ce5a612e4 (patch) | |
tree | db4d50caf9ff13ccf79759665bf64de369d1437c /vcl | |
parent | 0658b056ad326c27e7d7b3f40219c2b6f34a9d9e (diff) |
coverity#1434893 Uninitialized pointer field
Change-Id: Idaa49b1abc0d50ab50eae35e0f4c015aeeedbd42
Reviewed-on: https://gerrit.libreoffice.org/53019
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/BitmapScaleConvolutionFilter.hxx | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/vcl/inc/BitmapScaleConvolutionFilter.hxx b/vcl/inc/BitmapScaleConvolutionFilter.hxx index 9a0c5dafbb04..16830a08a147 100644 --- a/vcl/inc/BitmapScaleConvolutionFilter.hxx +++ b/vcl/inc/BitmapScaleConvolutionFilter.hxx @@ -28,19 +28,18 @@ namespace vcl { class VCL_DLLPUBLIC BitmapScaleConvolutionFilter : public BitmapFilter { -public: - BitmapScaleConvolutionFilter(const double& rScaleX, const double& rScaleY) - : mrScaleX(rScaleX) +protected: + BitmapScaleConvolutionFilter(const double& rScaleX, const double& rScaleY, Kernel* pKernel) + : mpKernel(pKernel) + , mrScaleX(rScaleX) , mrScaleY(rScaleY) { } virtual BitmapEx execute(BitmapEx const& rBitmap) override; -protected: - Kernel* mpKernel; - private: + Kernel* mpKernel; double mrScaleX; double mrScaleY; }; @@ -49,9 +48,8 @@ class VCL_DLLPUBLIC BitmapScaleBilinearFilter : public BitmapScaleConvolutionFil { public: BitmapScaleBilinearFilter(const double& rScaleX, const double& rScaleY) - : BitmapScaleConvolutionFilter(rScaleX, rScaleY) + : BitmapScaleConvolutionFilter(rScaleX, rScaleY, new BilinearKernel) { - mpKernel = new BilinearKernel(); } }; @@ -59,9 +57,8 @@ class VCL_DLLPUBLIC BitmapScaleBicubicFilter : public BitmapScaleConvolutionFilt { public: BitmapScaleBicubicFilter(const double& rScaleX, const double& rScaleY) - : BitmapScaleConvolutionFilter(rScaleX, rScaleY) + : BitmapScaleConvolutionFilter(rScaleX, rScaleY, new BicubicKernel) { - mpKernel = new BicubicKernel(); } }; @@ -69,9 +66,8 @@ class VCL_DLLPUBLIC BitmapScaleLanczos3Filter : public BitmapScaleConvolutionFil { public: BitmapScaleLanczos3Filter(const double& rScaleX, const double& rScaleY) - : BitmapScaleConvolutionFilter(rScaleX, rScaleY) + : BitmapScaleConvolutionFilter(rScaleX, rScaleY, new Lanczos3Kernel) { - mpKernel = new Lanczos3Kernel(); } }; |