Allow functions for GetNonNull and GetOptional to work when const.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-03-30 19:06:08 +02:00
parent 4c1ca2e822
commit 4f563e6e67
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ namespace Arbutils::Memory {
inline constexpr const T* GetUnsafe() const noexcept { return _ptr; } inline constexpr const T* GetUnsafe() const noexcept { return _ptr; }
inline constexpr bool IsNull() const noexcept { return _ptr == nullptr; } inline constexpr bool IsNull() const noexcept { return _ptr == nullptr; }
inline NonNullBorrowedPtr<T> GetNonNull(){ inline NonNullBorrowedPtr<T> GetNonNull() const {
return NonNullBorrowedPtr<T>(_ptr); return NonNullBorrowedPtr<T>(_ptr);
} }

View File

@ -18,7 +18,7 @@ namespace Arbutils::Memory {
inline constexpr T* GetUnsafe() noexcept { return _ptr; } inline constexpr T* GetUnsafe() noexcept { return _ptr; }
inline constexpr const T* GetUnsafe() const noexcept { return _ptr; } inline constexpr const T* GetUnsafe() const noexcept { return _ptr; }
inline BorrowedPtr<T> GetOptional(){ inline BorrowedPtr<T> GetOptional() const {
return BorrowedPtr<T>(_ptr); return BorrowedPtr<T>(_ptr);
} }