aboutsummaryrefslogtreecommitdiff
path: root/zencore/include
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2021-09-01 14:56:15 +0200
committerStefan Boberg <[email protected]>2021-09-01 14:56:15 +0200
commit48d89ae93fe7ef12f34df9d483988a8a213d3914 (patch)
treea58e8e07e841abdcb987d2293c8b59c5dd24e278 /zencore/include
parentSharedBuffer: MakeOwned now returns a buffer instead of operating in-place (diff)
downloadzen-48d89ae93fe7ef12f34df9d483988a8a213d3914.tar.xz
zen-48d89ae93fe7ef12f34df9d483988a8a213d3914.zip
Fixed SharedBuffer::IsOwned() semantics to match UE5
Diffstat (limited to 'zencore/include')
-rw-r--r--zencore/include/zencore/sharedbuffer.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/zencore/include/zencore/sharedbuffer.h b/zencore/include/zencore/sharedbuffer.h
index b30f09d50..b230c05b1 100644
--- a/zencore/include/zencore/sharedbuffer.h
+++ b/zencore/include/zencore/sharedbuffer.h
@@ -109,7 +109,7 @@ public:
[[nodiscard]] ZENCORE_API SharedBuffer MakeOwned() const&;
[[nodiscard]] ZENCORE_API SharedBuffer MakeOwned() &&;
- [[nodiscard]] bool IsOwned() const { return m_Buffer && m_Buffer->IsOwned(); }
+ [[nodiscard]] bool IsOwned() const { return !m_Buffer || m_Buffer->IsOwned(); }
[[nodiscard]] inline bool IsNull() const { return !m_Buffer; }
inline void Reset() { m_Buffer = nullptr; }