Index: src/core/SkTLList.h |
diff --git a/src/core/SkTLList.h b/src/core/SkTLList.h |
index 298ce516cc01ffa1b0dce0cb872d286730f72ed3..99b5bc67d964d2b6bc07584847993bafff925d71 100644 |
--- a/src/core/SkTLList.h |
+++ b/src/core/SkTLList.h |
@@ -75,6 +75,15 @@ public: |
return reinterpret_cast<T*>(node->fObj); |
} |
+ T* addToHead() { |
+ this->validate(); |
+ Node* node = this->createNode(); |
+ fList.addToHead(node); |
+ SkNEW_PLACEMENT(node->fObj, T); |
+ this->validate(); |
+ return reinterpret_cast<T*>(node->fObj); |
+ } |
+ |
T* addToTail(const T& t) { |
this->validate(); |
Node* node = this->createNode(); |
@@ -84,6 +93,15 @@ public: |
return reinterpret_cast<T*>(node->fObj); |
} |
+ T* addToTail() { |
+ this->validate(); |
+ Node* node = this->createNode(); |
+ fList.addToTail(node); |
+ SkNEW_PLACEMENT(node->fObj, T); |
+ this->validate(); |
+ return reinterpret_cast<T*>(node->fObj); |
+ } |
+ |
/** Adds a new element to the list before the location indicated by the iterator. If the |
iterator refers to a NULL location then the new element is added at the tail */ |
T* addBefore(const T& t, const Iter& location) { |