diff options
Diffstat (limited to 'source/core/smart-pointer.h')
| -rw-r--r-- | source/core/smart-pointer.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/core/smart-pointer.h b/source/core/smart-pointer.h index d026388c0..e19ed6a4d 100644 --- a/source/core/smart-pointer.h +++ b/source/core/smart-pointer.h @@ -194,6 +194,9 @@ namespace Slang return RefPtr<U>(Slang::as<U>(pointer)); } + template <typename U> + bool is() const { return Slang::as<U>(pointer) != nullptr; } + ~RefPtr() { releaseReference((Slang::RefObject*) pointer); |
