diff options
-rw-r--r-- | include/core/SkTDArray.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/core/SkTDArray.h b/include/core/SkTDArray.h index 4c90460b94..92f297c31a 100644 --- a/include/core/SkTDArray.h +++ b/include/core/SkTDArray.h @@ -282,12 +282,12 @@ public: } // routines to treat the array like a stack - T* push() { return this->append(); } - void push(const T& elem) { *this->append() = elem; } - const T& top() const { return (*this)[fCount - 1]; } - T& top() { return (*this)[fCount - 1]; } - void pop(T* elem) { if (elem) *elem = (*this)[fCount - 1]; --fCount; } - void pop() { --fCount; } + T* push() { return this->append(); } + void push(const T& elem) { *this->append() = elem; } + const T& top() const { return (*this)[fCount - 1]; } + T& top() { return (*this)[fCount - 1]; } + void pop(T* elem) { SkASSERT(fCount > 0); if (elem) *elem = (*this)[fCount - 1]; --fCount; } + void pop() { SkASSERT(fCount > 0); --fCount; } void deleteAll() { T* iter = fArray; |