From 8ef3bfcc9579ab66ff77d929a32608305c4630a5 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: Sat, 18 Jun 2022 12:08:34 +0300 Subject: [PATCH] mdbx++: refine descriptions for `compare_fast()` and `compare_lexicographically()`. --- mdbx.h++ | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/mdbx.h++ b/mdbx.h++ index 6a727f3e..ace662d8 100644 --- a/mdbx.h++ +++ b/mdbx.h++ @@ -965,20 +965,21 @@ struct LIBMDBX_API_TYPE slice : public ::MDBX_val { hash_value() const noexcept; /// \brief Three-way fast non-lexicographically length-based comparison. - /// \return value: - /// == 0 if "a" == "b", - /// < 0 if "a" shorter than "b", - /// > 0 if "a" longer than "b", - /// < 0 if "a" length-equal and lexicographically less than "b", - /// > 0 if "a" length-equal and lexicographically great than "b". + /// \details Firstly compares length and if it equal then compare content + /// lexicographically. \return value: + /// `== 0` if `a` the same as `b`; + /// `< 0` if `a` shorter than `b`, + /// or the same length and lexicographically less than `b`; + /// `> 0` if `a` longer than `b`, + /// or the same length and lexicographically great than `b`. MDBX_NOTHROW_PURE_FUNCTION static MDBX_CXX14_CONSTEXPR intptr_t compare_fast(const slice &a, const slice &b) noexcept; /// \brief Three-way lexicographically comparison. /// \return value: - /// < 0 if "a" < "b", - /// == 0 if "a" == "b", - /// > 0 if "a" > "b". + /// `== 0` if `a` lexicographically equal `b`; + /// `< 0` if `a` lexicographically less than `b`; + /// `> 0` if `a` lexicographically great than `b`. MDBX_NOTHROW_PURE_FUNCTION static MDBX_CXX14_CONSTEXPR intptr_t compare_lexicographically(const slice &a, const slice &b) noexcept; friend MDBX_CXX14_CONSTEXPR bool operator==(const slice &a,