diff --git a/src/Memory/__OptionalBorrowedPtr.hpp b/src/Memory/__OptionalBorrowedPtr.hpp index 511bee4..2dddc15 100644 --- a/src/Memory/__OptionalBorrowedPtr.hpp +++ b/src/Memory/__OptionalBorrowedPtr.hpp @@ -58,12 +58,12 @@ namespace ArbUt { inline bool operator!=(T* rhs) const noexcept { return _raw != rhs; } /// @brief Returns a const version of the underlying pointer. - inline OptionalBorrowedPtr Const() const noexcept { return BorrowedPtr(_raw); } + inline OptionalBorrowedPtr Const() const noexcept { return OptionalBorrowedPtr(_raw); } /// @brief Casts the underlying pointer to another type using dynamic_cast. template inline OptionalBorrowedPtr As() const { auto cast = dynamic_cast(_raw); - return BorrowedPtr(cast); + return OptionalBorrowedPtr(cast); } /// @brief Try to cast the underlying pointer to another type using dynamic_cast. @@ -78,7 +78,7 @@ namespace ArbUt { /// @brief Force cast the underlying pointer to another type using reinterpret_cast. template inline OptionalBorrowedPtr ForceAs() const noexcept { auto cast = reinterpret_cast(_raw); - return BorrowedPtr(cast); + return OptionalBorrowedPtr(cast); } /// @brief Implicit cast to retrieve raw pointer.