diff --git a/src/Memory/__OptionalScopedPtr.hpp b/src/Memory/__OptionalScopedPtr.hpp index 58c15c2..2590c41 100644 --- a/src/Memory/__OptionalScopedPtr.hpp +++ b/src/Memory/__OptionalScopedPtr.hpp @@ -47,7 +47,7 @@ namespace ArbUt { inline T* GetValue() const noexcept { return _raw; } /// @brief Get the raw underlying pointer. - inline T* TakeOwnership() const noexcept { + inline T* TakeOwnership() noexcept { auto raw = _raw; _raw = nullptr; return raw; diff --git a/src/Memory/__ScopedPtr.hpp b/src/Memory/__ScopedPtr.hpp index 80ac1ae..589b6bc 100644 --- a/src/Memory/__ScopedPtr.hpp +++ b/src/Memory/__ScopedPtr.hpp @@ -47,7 +47,7 @@ namespace ArbUt { inline T* operator->() const noexcept { return _raw; } /// @brief Get the raw underlying pointer. - inline T* TakeOwnership() const noexcept { + inline T* TakeOwnership() noexcept { auto raw = _raw; _raw = nullptr; return raw;