Index: include/core/SkLazyPtr.h |
diff --git a/src/core/SkLazyPtr.h b/include/core/SkLazyPtr.h |
similarity index 98% |
rename from src/core/SkLazyPtr.h |
rename to include/core/SkLazyPtr.h |
index 7273079252a7f89e8ea22c78d9ed620ec31303ac..896dfbf88d762570545a9e5a7715aeeb795313e9 100644 |
--- a/src/core/SkLazyPtr.h |
+++ b/include/core/SkLazyPtr.h |
@@ -147,19 +147,19 @@ public: |
SkLazyPtr() : fPtr(NULL) {} |
~SkLazyPtr() { if (fPtr) { Destroy((T*)fPtr); } } |
- T* get() { |
+ T* get() const { |
T* ptr = (T*)sk_consume_load(&fPtr); |
return ptr ? ptr : Private::try_cas<T*, Destroy>(&fPtr, SkNEW(T)); |
} |
template <typename Create> |
- T* get(const Create& create) { |
+ T* get(const Create& create) const { |
T* ptr = (T*)sk_consume_load(&fPtr); |
return ptr ? ptr : Private::try_cas<T*, Destroy>(&fPtr, create()); |
} |
private: |
- void* fPtr; |
+ mutable void* fPtr; |
}; |