diff options
| author | Stefan Boberg <[email protected]> | 2021-09-13 12:19:59 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-09-13 12:19:59 +0200 |
| commit | fe630a348ecdd86d639389eec4b103dc0883341c (patch) | |
| tree | 86b826b76aa1d6235750eaeaf8d5ff21fda9df4d | |
| parent | Changed CbPackage::TryLoad() signature so it can handle temporaries (diff) | |
| download | zen-fe630a348ecdd86d639389eec4b103dc0883341c.tar.xz zen-fe630a348ecdd86d639389eec4b103dc0883341c.zip | |
Added Ref<>::Get to work around issue casting a pointer to a derived type to a pointer to a parent type
| -rw-r--r-- | zencore/include/zencore/refcount.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/zencore/include/zencore/refcount.h b/zencore/include/zencore/refcount.h index 288b649c6..50bd82f59 100644 --- a/zencore/include/zencore/refcount.h +++ b/zencore/include/zencore/refcount.h @@ -117,6 +117,7 @@ public: [[nodiscard]] inline bool IsNull() const { return m_Ref == nullptr; } inline explicit operator bool() const { return m_Ref != nullptr; } inline T* operator->() const { return m_Ref; } + inline T* Get() const { return m_Ref; } inline std::strong_ordering operator<=>(const Ref& Rhs) const = default; |