From b43eed2c2b62a9cb064107ae4cc5d39c47ae9a13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Tue, 22 Oct 2024 22:24:08 +0300 Subject: [PATCH] =?UTF-8?q?mdbx++:=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B8=D0=BC?= =?UTF-8?q?=D0=B5=D0=BD=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=B2=D0=BD?= =?UTF-8?q?=D1=83=D1=82=D1=80=D0=B5=D0=BD=D0=BD=D0=B8=D1=85=20=D0=BC=D0=B5?= =?UTF-8?q?=D1=82=D0=BE=D0=B4=D0=BE=D0=B2=20`mdbx::buffer<>::silo::bin::in?= =?UTF-8?q?place=5Flastbyte()`.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mdbx.h++ | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mdbx.h++ b/mdbx.h++ index 75761c10..fbf8c28b 100644 --- a/mdbx.h++ +++ b/mdbx.h++ @@ -1743,10 +1743,10 @@ private: << (sizeof(size_t /* allocated::capacity_bytes_ */) - 1) * CHAR_BIT }; - constexpr byte lastbyte() const noexcept { + constexpr byte inplace_lastbyte() const noexcept { return inplace_[sizeof(bin) - 1]; } - MDBX_CXX17_CONSTEXPR byte &lastbyte() noexcept { + MDBX_CXX17_CONSTEXPR byte &inplace_lastbyte() noexcept { return inplace_[sizeof(bin) - 1]; } @@ -1758,7 +1758,7 @@ private: (std::numeric_limits::max() >> CHAR_BIT) == inplace_signature_limit, "WTF?"); - return lastbyte() == lastbyte_inplace_signature; + return inplace_lastbyte() == lastbyte_inplace_signature; } constexpr bool is_allocated() const noexcept { return !is_inplace(); } @@ -1772,7 +1772,7 @@ private: if (::std::is_trivial::value) /* workaround for "uninitialized" warning from some compilers */ memset(&allocated_.ptr_, 0, sizeof(allocated_.ptr_)); - lastbyte() = lastbyte_inplace_signature; + inplace_lastbyte() = lastbyte_inplace_signature; MDBX_CONSTEXPR_ASSERT(is_inplace() && address() == inplace_ && is_suitable_for_inplace(capacity())); return address();