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

Unified Diff: include/core/SkTDict.h

Issue 12315131: Make SkTDArray accessors const-friendly (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 10 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 | « include/core/SkTDArray.h ('k') | src/core/SkPathHeap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkTDict.h
===================================================================
--- include/core/SkTDict.h (revision 7881)
+++ include/core/SkTDict.h (working copy)
@@ -84,8 +84,8 @@
bool findKey(T& value, const char** name) const
{
- Pair* end = fArray.end();
- for (Pair* pair = fArray.begin(); pair < end; pair++) {
+ const Pair* end = fArray.end();
+ for (const Pair* pair = fArray.begin(); pair < end; pair++) {
if (pair->fValue != value)
continue;
*name = pair->fName;
@@ -131,8 +131,8 @@
return name;
}
private:
- Pair* fIter;
- Pair* fStop;
+ const Pair* fIter;
+ const Pair* fStop;
};
private:
« no previous file with comments | « include/core/SkTDArray.h ('k') | src/core/SkPathHeap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698