From 0b740ee24da51e6131e293c15b2019086d1a2bdb Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Tue, 26 May 2020 19:40:08 +0200 Subject: [PATCH] Fixed cast functions on BorrowedPtr being invalid. --- src/Memory/BorrowedPtr.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Memory/BorrowedPtr.hpp b/src/Memory/BorrowedPtr.hpp index 34ee926..b7a2d7d 100644 --- a/src/Memory/BorrowedPtr.hpp +++ b/src/Memory/BorrowedPtr.hpp @@ -33,12 +33,12 @@ namespace ArbUt { [[nodiscard]] inline constexpr bool IsNull() const noexcept { return _raw == nullptr; } template inline BorrowedPtr As() const { - auto cast = dynamic_cast(_raw); + auto cast = dynamic_cast(_raw); return BorrowedPtr(cast); } template inline bool TryAs(BorrowedPtr& out) const { - auto cast = dynamic_cast(_raw); + auto cast = dynamic_cast(_raw); if (cast == nullptr) return false; out = BorrowedPtr(cast); @@ -46,7 +46,7 @@ namespace ArbUt { } template inline BorrowedPtr ForceAs() const { - auto cast = reinterpret_cast(_raw); + auto cast = reinterpret_cast(_raw); return BorrowedPtr(cast); } };