From 20a550c6ea947f0ab239da1d4ecba209d76a98fd Mon Sep 17 00:00:00 2001 From: "justinlin@google.com" Date: Fri, 27 Jul 2012 17:37:12 +0000 Subject: [PATCH] Add virtual destructor to class with virtual functions. BUG= TEST= Review URL: https://codereview.appspot.com/6453052 git-svn-id: http://skia.googlecode.com/svn/trunk@4810 2bbb7eff-a529-9590-31e7-b0007b416f81 --- include/core/SkCanvas.h | 1 + src/core/SkCanvas.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h index 8fa73f6..2b1da3b 100644 --- a/include/core/SkCanvas.h +++ b/include/core/SkCanvas.h @@ -901,6 +901,7 @@ public: class ClipVisitor { public: + virtual ~ClipVisitor(); virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; }; diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp index 17f8b83..57f11df 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -2066,3 +2066,7 @@ const SkPaint& SkCanvas::LayerIter::paint() const { const SkRegion& SkCanvas::LayerIter::clip() const { return fImpl->getClip(); } int SkCanvas::LayerIter::x() const { return fImpl->getX(); } int SkCanvas::LayerIter::y() const { return fImpl->getY(); } + +/////////////////////////////////////////////////////////////////////////////// + +SkCanvas::ClipVisitor::~ClipVisitor() { } -- 2.7.4