Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Side by Side Diff: include/core/SkTInternalLList.h

Issue 226183018: SkNonCopyable should be used with private inheritance. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: name resolution Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/core/SkRefCnt.h ('k') | include/core/SkTypes.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkTInternalLList_DEFINED 8 #ifndef SkTInternalLList_DEFINED
9 #define SkTInternalLList_DEFINED 9 #define SkTInternalLList_DEFINED
10 10
(...skipping 20 matching lines...) Expand all
31 #define SK_DECLARE_INTERNAL_LLIST_INTERFACE(ClassName) \ 31 #define SK_DECLARE_INTERNAL_LLIST_INTERFACE(ClassName) \
32 friend class SkTInternalLList<ClassName>; \ 32 friend class SkTInternalLList<ClassName>; \
33 /* back pointer to the owning list - for debugging */ \ 33 /* back pointer to the owning list - for debugging */ \
34 SkDEBUGCODE(SkPtrWrapper<SkTInternalLList<ClassName> > fList;) \ 34 SkDEBUGCODE(SkPtrWrapper<SkTInternalLList<ClassName> > fList;) \
35 SkPtrWrapper<ClassName> fPrev; \ 35 SkPtrWrapper<ClassName> fPrev; \
36 SkPtrWrapper<ClassName> fNext 36 SkPtrWrapper<ClassName> fNext
37 37
38 /** 38 /**
39 * This class implements a templated internal doubly linked list data structure. 39 * This class implements a templated internal doubly linked list data structure.
40 */ 40 */
41 template <class T> class SkTInternalLList : public SkNoncopyable { 41 template <class T> class SkTInternalLList : SkNoncopyable {
42 public: 42 public:
43 SkTInternalLList() 43 SkTInternalLList()
44 : fHead(NULL) 44 : fHead(NULL)
45 , fTail(NULL) { 45 , fTail(NULL) {
46 } 46 }
47 47
48 void remove(T* entry) { 48 void remove(T* entry) {
49 SkASSERT(NULL != fHead && NULL != fTail); 49 SkASSERT(NULL != fHead && NULL != fTail);
50 SkASSERT(this->isInList(entry)); 50 SkASSERT(this->isInList(entry));
51 51
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 #endif // SK_DEBUG 263 #endif // SK_DEBUG
264 264
265 private: 265 private:
266 T* fHead; 266 T* fHead;
267 T* fTail; 267 T* fTail;
268 268
269 typedef SkNoncopyable INHERITED; 269 typedef SkNoncopyable INHERITED;
270 }; 270 };
271 271
272 #endif 272 #endif
OLDNEW
« no previous file with comments | « include/core/SkRefCnt.h ('k') | include/core/SkTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698