From 05141c23ed2731bf04e7a1ca2a03ca23014b7222 Mon Sep 17 00:00:00 2001 From: "robertphillips@google.com" Date: Fri, 27 Apr 2012 12:54:01 +0000 Subject: Fixed minor c++ issues found by cppcheck http://codereview.appspot.com/6127049/ git-svn-id: http://skia.googlecode.com/svn/trunk@3771 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/pdf/SkPDFShader.cpp | 4 ++-- src/pdf/SkPDFShader.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/pdf') diff --git a/src/pdf/SkPDFShader.cpp b/src/pdf/SkPDFShader.cpp index c3c3cd060c..152c693562 100644 --- a/src/pdf/SkPDFShader.cpp +++ b/src/pdf/SkPDFShader.cpp @@ -303,7 +303,7 @@ public: class SkPDFFunctionShader : public SkPDFDict, public SkPDFShader { public: explicit SkPDFFunctionShader(SkPDFShader::State* state); - ~SkPDFFunctionShader() { + virtual ~SkPDFFunctionShader() { if (isValid()) { RemoveShader(this); } @@ -328,7 +328,7 @@ private: class SkPDFImageShader : public SkPDFStream, public SkPDFShader { public: explicit SkPDFImageShader(SkPDFShader::State* state); - ~SkPDFImageShader() { + virtual ~SkPDFImageShader() { RemoveShader(this); fResources.unrefAll(); } diff --git a/src/pdf/SkPDFShader.h b/src/pdf/SkPDFShader.h index afa63e7631..f41bdf038e 100644 --- a/src/pdf/SkPDFShader.h +++ b/src/pdf/SkPDFShader.h @@ -60,6 +60,7 @@ protected: static void RemoveShader(SkPDFObject* shader); SkPDFShader(); + virtual ~SkPDFShader() {}; virtual bool isValid() = 0; }; -- cgit v1.2.3