summaryrefslogtreecommitdiffhomepage
path: root/compat/borrowed-ptr-cast.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'compat/borrowed-ptr-cast.hpp')
-rw-r--r--compat/borrowed-ptr-cast.hpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/compat/borrowed-ptr-cast.hpp b/compat/borrowed-ptr-cast.hpp
index b9db2e5b..f202af30 100644
--- a/compat/borrowed-ptr-cast.hpp
+++ b/compat/borrowed-ptr-cast.hpp
@@ -22,11 +22,7 @@ bptr<To> static_pointer_cast(const bptr<From>& p) noexcept
if constexpr (detail_borrowed_ptr::StaticCastable<From, To>)
{
if (p.blk && p.blk->_ptr) [[likely]]
- {
- fm_assert(p.casted_ptr);
- auto* ret = static_cast<To*>(p.casted_ptr);
- return bptr<To>{DirectInit, ret, p.blk};
- }
+ return bptr<To>{p, bptr<To>::private_tag};
}
else
{