vcl/inc/BitmapScaleConvolutionFilter.hxx | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-)
New commits: commit 5d35d01dc79c5af817e8a78dfddef35ce5a612e4 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Apr 17 10:21:05 2018 +0100 coverity#1434893 Uninitialized pointer field Change-Id: Idaa49b1abc0d50ab50eae35e0f4c015aeeedbd42 Reviewed-on: https://gerrit.libreoffice.org/53019 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> 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(); } }; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits