diff options
author | bsalomon <bsalomon@google.com> | 2014-07-02 13:44:57 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-07-02 13:44:58 -0700 |
commit | e1bc1c6958de768521323075b659d6ec6ad442fc (patch) | |
tree | 1d30b9106300b450dd8f790b92d2ffc0a16a3f4f /src | |
parent | a5c08447cb28d8f6f77729d4e4aeedc74b245c42 (diff) |
Make GrAllocator Iter return non-const T
R=egdaniel@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/362333004
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/GrAllocator.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gpu/GrAllocator.h b/src/gpu/GrAllocator.h index 50d9a6cdad..933be9f655 100644 --- a/src/gpu/GrAllocator.h +++ b/src/gpu/GrAllocator.h @@ -142,7 +142,7 @@ public: * Gets the current iterator value. Call next() at least once before calling. Don't call * after next() returns false. */ - const void* get() const { + void* get() const { SkASSERT(fItemIndex >= 0 && fItemIndex < fAllocator->fCount); return (char*) fAllocator->fBlocks[fBlockIndex] + fIndexInBlock * fAllocator->fItemSize; } @@ -296,13 +296,13 @@ public: * Gets the current iterator value. Call next() at least once before calling. Don't call * after next() returns false. */ - const T* get() const { return (const T*) fImpl.get(); } + T* get() const { return (T*) fImpl.get(); } /** * Convenience operators. Same rules for calling apply as get(). */ - const T& operator*() const { return *this->get(); } - const T* operator->() const { return this->get(); } + T& operator*() const { return *this->get(); } + T* operator->() const { return this->get(); } private: GrAllocator::Iter fImpl; |