Index: include/core/SkTLazy.h |
diff --git a/include/core/SkTLazy.h b/include/core/SkTLazy.h |
index 31dce6085f96779c3137fc5bf4011766a91b31f4..8dbc3f6552dbbf5c5d2577ee62837b29eb3d9abb 100644 |
--- a/include/core/SkTLazy.h |
+++ b/include/core/SkTLazy.h |
@@ -21,8 +21,10 @@ template <typename T> class SkTLazy { |
public: |
SkTLazy() : fPtr(nullptr) {} |
- explicit SkTLazy(const T* src) |
- : fPtr(src ? new (fStorage.get()) T(*src) : nullptr) {} |
+ explicit SkTLazy(const T* src) { |
+ // Not in initializer list because it depends on fStorage. |
mtklein
2016/08/24 01:19:28
Alternatively, swap the order of the member variab
f(malita)
2016/08/24 13:47:29
Done.
|
+ fPtr = src ? new (fStorage.get()) T(*src) : nullptr; |
+ } |
SkTLazy(const SkTLazy& src) : fPtr(nullptr) { *this = src; } |