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

This commit is contained in:
Deukhoofd committed 2020-03-30 19:06:08 +02:00
1 parent 4c1ca2e822
commit 4f563e6e67
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -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<T> GetNonNull(){
inline NonNullBorrowedPtr<T> GetNonNull() const {
return NonNullBorrowedPtr<T>(_ptr);
}
+1 -1
View File
@@ -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<T> GetOptional(){
inline BorrowedPtr<T> GetOptional() const {
return BorrowedPtr<T>(_ptr);
}