Index: include/core/SkTInternalLList.h |
diff --git a/include/core/SkTInternalLList.h b/include/core/SkTInternalLList.h |
index 1c82a71cda6788b89105d25bcb7cbf847546b537..8059e49a1fc3359dd9e1fa61aae334573015bb17 100644 |
--- a/include/core/SkTInternalLList.h |
+++ b/include/core/SkTInternalLList.h |
@@ -71,6 +71,28 @@ public: |
#endif |
} |
+ void removeHead() { |
+ SkASSERT(NULL != fHead && NULL != fTail); |
+ SkASSERT(NULL = fHead->fPrev); |
mtklein
2014/08/15 16:02:43
" NULL = " ಠ_ಠ
bsalomon
2014/08/19 15:16:08
ha, it turns out I didn't actually need this and i
|
+ |
+ T* next = fHead->fNext; |
+ |
+ if (NULL != next) { |
+ next->fPrev = NULL; |
+ } else { |
+ fTail = NULL; |
+ } |
+ |
+ fHead->fPrev = NULL; |
+ fHead->fNext = NULL; |
+ |
+#ifdef SK_DEBUG |
+ fHead->fList = NULL; |
+#endif |
+ |
+ fHead = next; |
+ } |
+ |
void addToHead(T* entry) { |
SkASSERT(NULL == entry->fPrev && NULL == entry->fNext); |
SkASSERT(NULL == entry->fList); |