From 6facd20b2bbe3d8604341d4af7dc0b17ebfe0474 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: Fri, 17 Nov 2023 23:34:22 +0300 Subject: [PATCH] =?UTF-8?q?mdbx++:=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20`buffer::as=5Fuint64()`=20=D0=B8=20?= =?UTF-8?q?=D1=82.=D0=B4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mdbx.h++ | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/mdbx.h++ b/mdbx.h++ index 2fd02072..af2aa246 100644 --- a/mdbx.h++ +++ b/mdbx.h++ @@ -2340,6 +2340,22 @@ public: return slice_.as_pod(); } +#ifdef MDBX_U128_TYPE + MDBX_U128_TYPE as_uint128() const { return slice().as_uint128(); } +#endif /* MDBX_U128_TYPE */ + uint64_t as_uint64() const { return slice().as_uint64(); } + uint32_t as_uint32() const { return slice().as_uint32(); } + uint16_t as_uint16() const { return slice().as_uint16(); } + uint8_t as_uint8() const { return slice().as_uint8(); } + +#ifdef MDBX_I128_TYPE + MDBX_I128_TYPE as_int128() const { return slice().as_int128(); } +#endif /* MDBX_I128_TYPE */ + int64_t as_int64() const { return slice().as_int64(); } + int32_t as_int32() const { return slice().as_int32(); } + int16_t as_int16() const { return slice().as_int16(); } + int8_t as_int8() const { return slice().as_int8(); } + /// \brief Returns a new buffer with a hexadecimal dump of the slice content. static buffer hex(const ::mdbx::slice &source, bool uppercase = false, unsigned wrap_width = 0,