From 4a92d82626980d6d1690113b9d27aae282fd48eb Mon Sep 17 00:00:00 2001 From: Tamito Kajiyama Date: Thu, 7 Mar 2013 23:17:23 +0000 Subject: A big code clean-up patch from Bastien Montagne, many thanks! --- source/blender/freestyle/intern/image/GaussianFilter.h | 3 ++- source/blender/freestyle/intern/image/Image.h | 2 +- source/blender/freestyle/intern/image/ImagePyramid.cpp | 4 ++-- source/blender/freestyle/intern/image/ImagePyramid.h | 10 +++++----- 4 files changed, 10 insertions(+), 9 deletions(-) (limited to 'source/blender/freestyle/intern/image') diff --git a/source/blender/freestyle/intern/image/GaussianFilter.h b/source/blender/freestyle/intern/image/GaussianFilter.h index 9890e615a7c..08fdf32ecd7 100644 --- a/source/blender/freestyle/intern/image/GaussianFilter.h +++ b/source/blender/freestyle/intern/image/GaussianFilter.h @@ -50,7 +50,8 @@ protected: float _sigma; float *_mask; int _bound; - int _maskSize; // the real mask size (must be odd)(the size of the mask we store is ((_maskSize+1)/2)*((_maskSize+1)/2)) + // the real mask size (must be odd)(the size of the mask we store is ((_maskSize+1)/2)*((_maskSize+1)/2)) + int _maskSize; int _storedMaskSize; // (_maskSize+1)/2) public: diff --git a/source/blender/freestyle/intern/image/Image.h b/source/blender/freestyle/intern/image/Image.h index 1487e43a0b0..757f6a8eca3 100644 --- a/source/blender/freestyle/intern/image/Image.h +++ b/source/blender/freestyle/intern/image/Image.h @@ -234,7 +234,7 @@ public: virtual ~RGBImage() { - if(_rgb) + if (_rgb) delete[] _rgb; } diff --git a/source/blender/freestyle/intern/image/ImagePyramid.cpp b/source/blender/freestyle/intern/image/ImagePyramid.cpp index c7616fbce23..b9854782d5b 100644 --- a/source/blender/freestyle/intern/image/ImagePyramid.cpp +++ b/source/blender/freestyle/intern/image/ImagePyramid.cpp @@ -134,7 +134,7 @@ GaussianPyramid::GaussianPyramid(const GrayImage& level0, unsigned nbLevels, flo BuildPyramid(level0, nbLevels); } -GaussianPyramid::GaussianPyramid(GrayImage* level0, unsigned nbLevels, float iSigma) : ImagePyramid() +GaussianPyramid::GaussianPyramid(GrayImage *level0, unsigned nbLevels, float iSigma) : ImagePyramid() { _sigma = iSigma; BuildPyramid(level0, nbLevels); @@ -151,7 +151,7 @@ void GaussianPyramid::BuildPyramid(const GrayImage& level0, unsigned nbLevels) BuildPyramid(pLevel, nbLevels); } -void GaussianPyramid::BuildPyramid(GrayImage* level0, unsigned nbLevels) +void GaussianPyramid::BuildPyramid(GrayImage *level0, unsigned nbLevels) { GrayImage *pLevel = level0; _levels.push_back(pLevel); diff --git a/source/blender/freestyle/intern/image/ImagePyramid.h b/source/blender/freestyle/intern/image/ImagePyramid.h index 4bab663318e..0665874a8e9 100644 --- a/source/blender/freestyle/intern/image/ImagePyramid.h +++ b/source/blender/freestyle/intern/image/ImagePyramid.h @@ -47,7 +47,7 @@ protected: std::vector _levels; public: - ImagePyramid(){} + ImagePyramid() {} ImagePyramid(const ImagePyramid& iBrother); //ImagePyramid(const GrayImage& level0, unsigned nbLevels); virtual ~ImagePyramid(); @@ -59,9 +59,9 @@ public: virtual void BuildPyramid(const GrayImage& level0, unsigned nbLevels) = 0; /*! Builds a pyramid without copying the base level */ - virtual void BuildPyramid(GrayImage* level0, unsigned nbLevels) = 0; + virtual void BuildPyramid(GrayImage *level0, unsigned nbLevels) = 0; - virtual GrayImage * getLevel(int l); + virtual GrayImage *getLevel(int l); /*! Returns the pixel x,y using bilinear interpolation. * \param x * the abscissa specified in the finest level coordinate system @@ -97,12 +97,12 @@ public: } GaussianPyramid(const GrayImage& level0, unsigned nbLevels, float iSigma=1.0f); - GaussianPyramid(GrayImage* level0, unsigned nbLevels, float iSigma=1.0f); + GaussianPyramid(GrayImage *level0, unsigned nbLevels, float iSigma=1.0f); GaussianPyramid(const GaussianPyramid& iBrother); virtual ~GaussianPyramid() {} virtual void BuildPyramid(const GrayImage& level0, unsigned nbLevels); - virtual void BuildPyramid(GrayImage* level0, unsigned nbLevels); + virtual void BuildPyramid(GrayImage *level0, unsigned nbLevels); /* accessors */ inline float getSigma() const -- cgit v1.2.3