diff --git a/BAN/include/BAN/WeakPtr.h b/BAN/include/BAN/WeakPtr.h index d68bfd05..b5d00416 100644 --- a/BAN/include/BAN/WeakPtr.h +++ b/BAN/include/BAN/WeakPtr.h @@ -20,7 +20,7 @@ namespace BAN class WeakLink : public RefCounted> { public: - RefPtr try_lock() + RefPtr try_lock() const { #if __is_kernel Kernel::SpinLockGuard _(m_weak_lock); @@ -44,7 +44,7 @@ namespace BAN private: T* m_ptr; #if __is_kernel - Kernel::SpinLock m_weak_lock; + mutable Kernel::SpinLock m_weak_lock; #endif friend class RefPtr>; }; @@ -99,7 +99,7 @@ namespace BAN return *this; } - RefPtr lock() + RefPtr lock() const { if (m_link) return m_link->try_lock();