Chromium Code Reviews| Index: include/core/SkRefCnt.h |
| diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h |
| index d33117751e0717943ec28b890bd645e98ff8f6bc..f899d1eb98e1462dae0fb115af200ecdf7e5cd5d 100644 |
| --- a/include/core/SkRefCnt.h |
| +++ b/include/core/SkRefCnt.h |
| @@ -244,6 +244,10 @@ public: |
| sk_sp() : fPtr(nullptr) {} |
| sk_sp(std::nullptr_t) : fPtr(nullptr) {} |
| + // TODO: for all these constructors and assignments that take <typename U>, |
| + // can we add static assertions that sk_sp<T> -> sk_sp<U> doesn't slice |
| + // (something like, T has a trivial destructor or U's destructor is virtual)? |
| + |
|
bungeman-skia
2016/03/07 19:29:45
Putting this here is a bit over constrained. sk_sp
mtklein_C
2016/03/07 19:40:46
Agreed. Now gone.
|
| /** |
| * Shares the underlying object by calling ref(), so that both the argument and the newly |
| * created sk_sp both have a reference to it. |