From e3beb6bd7de7fa211681abbb0be58e80b19885e0 Mon Sep 17 00:00:00 2001 From: "commit-bot@chromium.org" Date: Mon, 7 Apr 2014 19:34:38 +0000 Subject: SkNonCopyable should be used with private inheritance. This is mostly s/public SkNoncopyable/SkNoncopyable/g. Two classes (SkDrawLooper::Context and SkPicture::OperationList) don't actually work with SkNoncopyable because they introduce a virtual destructor. I added SkNoncopyableVirtual to make them work as intended. Sort of questionable whether they really need to be noncopyable in the first place, but I guess it doesn't hurt to keep the behavior the same. BUG=skia: R=reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/226183018 git-svn-id: http://skia.googlecode.com/svn/trunk@14081 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/core/SkMatrixClipStateMgr.h | 4 ++-- src/core/SkSmallAllocator.h | 2 +- src/core/SkTLList.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core') diff --git a/src/core/SkMatrixClipStateMgr.h b/src/core/SkMatrixClipStateMgr.h index b227583138..270eacd032 100644 --- a/src/core/SkMatrixClipStateMgr.h +++ b/src/core/SkMatrixClipStateMgr.h @@ -53,7 +53,7 @@ public: static const int32_t kIdentityWideOpenStateID = 0; static const int kIdentityMatID = 0; - class MatrixClipState : public SkNoncopyable { + class MatrixClipState : SkNoncopyable { public: class MatrixInfo { public: @@ -108,7 +108,7 @@ public: typedef SkNoncopyable INHERITED; }; - class ClipInfo : public SkNoncopyable { + class ClipInfo : SkNoncopyable { public: ClipInfo() {} diff --git a/src/core/SkSmallAllocator.h b/src/core/SkSmallAllocator.h index 2eddb510cd..655008b706 100644 --- a/src/core/SkSmallAllocator.h +++ b/src/core/SkSmallAllocator.h @@ -29,7 +29,7 @@ template void destroyT(void* ptr) { * object it allocated and freeing its memory. */ template -class SkSmallAllocator : public SkNoncopyable { +class SkSmallAllocator : SkNoncopyable { public: SkSmallAllocator() : fStorageUsed(0) diff --git a/src/core/SkTLList.h b/src/core/SkTLList.h index aeae3f72ee..e2b9691430 100644 --- a/src/core/SkTLList.h +++ b/src/core/SkTLList.h @@ -28,7 +28,7 @@ inline void* operator new(size_t, SkTLList* list, constructor arguments for type_name. These macros behave like addBefore() and addAfter(). */ template -class SkTLList : public SkNoncopyable { +class SkTLList : SkNoncopyable { private: struct Block; struct Node { -- cgit v1.2.3