From 68a0990512df4721d69b630aafccfb3f53ca7b0e Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 14 Jul 2024 14:24:43 +0200 Subject: w --- compat/borrowed-ptr.hpp | 18 +++++++++--------- compat/borrowed-ptr.inl | 4 +--- 2 files changed, 10 insertions(+), 12 deletions(-) (limited to 'compat') diff --git a/compat/borrowed-ptr.hpp b/compat/borrowed-ptr.hpp index 3982b547..146fc334 100644 --- a/compat/borrowed-ptr.hpp +++ b/compat/borrowed-ptr.hpp @@ -48,15 +48,15 @@ public: bptr(std::nullptr_t) noexcept; // NOLINT(*-explicit-conversions) bptr& operator=(std::nullptr_t) noexcept; - bptr(const bptr&) noexcept; - bptr& operator=(const bptr&) noexcept; - template Y> bptr(const bptr&) noexcept; - template Y> bptr& operator=(const bptr&) noexcept; - - bptr(bptr&&) noexcept; - bptr& operator=(bptr&&) noexcept; - template Y> bptr(bptr&&) noexcept; - template Y> bptr& operator=(bptr&&) noexcept; + CORRADE_ALWAYS_INLINE bptr(const bptr&) noexcept; + CORRADE_ALWAYS_INLINE bptr& operator=(const bptr&) noexcept; + template Y> CORRADE_ALWAYS_INLINE bptr(const bptr&) noexcept; + template Y> CORRADE_ALWAYS_INLINE bptr& operator=(const bptr&) noexcept; + + CORRADE_ALWAYS_INLINE bptr(bptr&&) noexcept; + CORRADE_ALWAYS_INLINE bptr& operator=(bptr&&) noexcept; + template Y> CORRADE_ALWAYS_INLINE bptr(bptr&&) noexcept; + template Y> CORRADE_ALWAYS_INLINE bptr& operator=(bptr&&) noexcept; operator bptr() const noexcept requires (!std::is_const_v); diff --git a/compat/borrowed-ptr.inl b/compat/borrowed-ptr.inl index c2a8b730..68a545d6 100644 --- a/compat/borrowed-ptr.inl +++ b/compat/borrowed-ptr.inl @@ -134,7 +134,6 @@ bptr& bptr::_copy_assign(const bptr& other) noexcept { if (blk != other.blk) { - CORRADE_ASSUME(this != &other); // todo see if helps if (blk) blk->decrement(blk); blk = other.blk; @@ -187,8 +186,7 @@ template bool bptr::operator==(const bptr> template void bptr::swap(bptr& other) noexcept { - using floormat::swap; - swap(blk, other.blk); + floormat::swap(blk, other.blk); } template uint32_t bptr::use_count() const noexcept -- cgit v1.2.3