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

Unified Diff: include/core/SkFlattenable.h

Issue 29143005: Constify SkFlattenable::getFactory(). (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 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 | include/core/SkFlattenableBuffers.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkFlattenable.h
diff --git a/include/core/SkFlattenable.h b/include/core/SkFlattenable.h
index 58e69fd416cb049b56d881942f6f77ebb676e93d..6cc76db46ed872379ef4ae07e8ec1819af29111c 100644
--- a/include/core/SkFlattenable.h
+++ b/include/core/SkFlattenable.h
@@ -27,10 +27,10 @@ class SkFlattenableWriteBuffer;
}
#define SK_DECLARE_UNFLATTENABLE_OBJECT() \
- virtual Factory getFactory() SK_OVERRIDE { return NULL; }
+ virtual Factory getFactory() const SK_OVERRIDE { return NULL; }
#define SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(flattenable) \
- virtual Factory getFactory() SK_OVERRIDE { return CreateProc; } \
+ virtual Factory getFactory() const SK_OVERRIDE { return CreateProc; } \
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) { \
return SkNEW_ARGS(flattenable, (buffer)); \
}
@@ -53,7 +53,7 @@ public:
to recreate your class given a buffer (previously written to by your
override of flatten().
*/
- virtual Factory getFactory() = 0;
+ virtual Factory getFactory() const = 0;
static Factory NameToFactory(const char name[]);
static const char* FactoryToName(Factory);
« no previous file with comments | « no previous file | include/core/SkFlattenableBuffers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698