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

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

Issue 104553002: Make SkTInternalLList::validate validate all nodes (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 } 220 }
221 221
222 private: 222 private:
223 T* fCurr; 223 T* fCurr;
224 }; 224 };
225 225
226 #ifdef SK_DEBUG 226 #ifdef SK_DEBUG
227 void validate() const { 227 void validate() const {
228 SkASSERT(!fHead == !fTail); 228 SkASSERT(!fHead == !fTail);
229 Iter iter; 229 Iter iter;
230 for (T* item = iter.init(*this, Iter::kHead_IterStart); NULL != (item = iter.next()); ) { 230 for (T* item = iter.init(*this, Iter::kHead_IterStart); NULL != item; it em = iter.next()) {
231 SkASSERT(this->isInList(item)); 231 SkASSERT(this->isInList(item));
232 if (NULL == item->fPrev) { 232 if (NULL == item->fPrev) {
233 SkASSERT(fHead == item); 233 SkASSERT(fHead == item);
234 } else { 234 } else {
235 SkASSERT(item->fPrev->fNext == item); 235 SkASSERT(item->fPrev->fNext == item);
236 } 236 }
237 if (NULL == item->fNext) { 237 if (NULL == item->fNext) {
238 SkASSERT(fTail == item); 238 SkASSERT(fTail == item);
239 } else { 239 } else {
240 SkASSERT(item->fNext->fPrev == item); 240 SkASSERT(item->fNext->fPrev == item);
(...skipping 22 matching lines...) Expand all
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 | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698