summaryrefslogtreecommitdiffhomepage
path: root/compat/borrowed-ptr-cast.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-07-14 10:48:42 +0200
committerStanislaw Halik <sthalik@misaki.pl>2024-07-14 13:04:43 +0200
commit5fe8eec392fa0568a03ad566a5b41c3b1df7a465 (patch)
tree828560d738492fbf7c58b9758e0858d54964c5c6 /compat/borrowed-ptr-cast.hpp
parentb1143255469c992a6d8475a070af951b7d09c51d (diff)
w
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
{