diff --git a/src/Memory/BorrowedPtr.hpp b/src/Memory/BorrowedPtr.hpp index 600ca0f..81f4db3 100644 --- a/src/Memory/BorrowedPtr.hpp +++ b/src/Memory/BorrowedPtr.hpp @@ -16,7 +16,7 @@ namespace Arbutils::Memory { inline constexpr const T* GetUnsafe() const noexcept { return _ptr; } inline constexpr bool IsNull() const noexcept { return _ptr == nullptr; } - inline NonNullBorrowedPtr GetNonNull(){ + inline NonNullBorrowedPtr GetNonNull() const { return NonNullBorrowedPtr(_ptr); } diff --git a/src/Memory/NonNullBorrowedPtr.hpp b/src/Memory/NonNullBorrowedPtr.hpp index 5b94f80..eb7e8f2 100644 --- a/src/Memory/NonNullBorrowedPtr.hpp +++ b/src/Memory/NonNullBorrowedPtr.hpp @@ -18,7 +18,7 @@ namespace Arbutils::Memory { inline constexpr T* GetUnsafe() noexcept { return _ptr; } inline constexpr const T* GetUnsafe() const noexcept { return _ptr; } - inline BorrowedPtr GetOptional(){ + inline BorrowedPtr GetOptional() const { return BorrowedPtr(_ptr); }