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

Unified Diff: src/gpu/GrAllocator.h

Issue 362333004: Make GrAllocator Iter return non-const T (Closed) Base URL: https://skia.googlesource.com/skia.git@allocator2
Patch Set: Created 6 years, 6 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAllocator.h
diff --git a/src/gpu/GrAllocator.h b/src/gpu/GrAllocator.h
index 50d9a6cdad6f661f03d21d5105f2d4efce24fc98..933be9f655aeb62c14c5d152cdd0d754c0cbf99d 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;
« 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