mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-02 00:54:14 +08:00
mdbx: использование clang-format-16.
This commit is contained in:
parent
cf9145bb46
commit
99c9bc2411
10
mdbx.h++
10
mdbx.h++
@ -591,11 +591,11 @@ concept ImmutableByteProducer = requires(const T &a, char array[42]) {
|
|||||||
* \interface SliceTranscoder
|
* \interface SliceTranscoder
|
||||||
* \brief SliceTranscoder C++20 concept */
|
* \brief SliceTranscoder C++20 concept */
|
||||||
template <typename T>
|
template <typename T>
|
||||||
concept SliceTranscoder = ImmutableByteProducer<T> &&
|
concept SliceTranscoder =
|
||||||
requires(const slice &source, const T &a) {
|
ImmutableByteProducer<T> && requires(const slice &source, const T &a) {
|
||||||
T(source);
|
T(source);
|
||||||
{ a.is_erroneous() } -> std::same_as<bool>;
|
{ a.is_erroneous() } -> std::same_as<bool>;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* MDBX_HAVE_CXX20_CONCEPTS */
|
#endif /* MDBX_HAVE_CXX20_CONCEPTS */
|
||||||
|
|
||||||
|
@ -6799,7 +6799,7 @@ static pgno_t *(*scan4seq_impl)(pgno_t *range, const size_t len,
|
|||||||
|
|
||||||
static pgno_t *scan4seq_resolver(pgno_t *range, const size_t len,
|
static pgno_t *scan4seq_resolver(pgno_t *range, const size_t len,
|
||||||
const size_t seq) {
|
const size_t seq) {
|
||||||
pgno_t *(*choice)(pgno_t * range, const size_t len, const size_t seq) =
|
pgno_t *(*choice)(pgno_t *range, const size_t len, const size_t seq) =
|
||||||
nullptr;
|
nullptr;
|
||||||
#if __has_builtin(__builtin_cpu_init) || defined(__BUILTIN_CPU_INIT__) || \
|
#if __has_builtin(__builtin_cpu_init) || defined(__BUILTIN_CPU_INIT__) || \
|
||||||
__GNUC_PREREQ(4, 8)
|
__GNUC_PREREQ(4, 8)
|
||||||
@ -16719,7 +16719,7 @@ static int cursor_last(MDBX_cursor *mc, MDBX_val *key, MDBX_val *data) {
|
|||||||
|
|
||||||
static __hot int cursor_get(MDBX_cursor *mc, MDBX_val *key, MDBX_val *data,
|
static __hot int cursor_get(MDBX_cursor *mc, MDBX_val *key, MDBX_val *data,
|
||||||
MDBX_cursor_op op) {
|
MDBX_cursor_op op) {
|
||||||
int (*mfunc)(MDBX_cursor * mc, MDBX_val * key, MDBX_val * data);
|
int (*mfunc)(MDBX_cursor *mc, MDBX_val *key, MDBX_val *data);
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
switch (op) {
|
switch (op) {
|
||||||
|
@ -90,8 +90,8 @@
|
|||||||
#endif
|
#endif
|
||||||
#if _MSC_VER > 1914
|
#if _MSC_VER > 1914
|
||||||
#pragma warning( \
|
#pragma warning( \
|
||||||
disable : 5105) /* winbase.h(9531): warning C5105: macro expansion \
|
disable : 5105) /* winbase.h(9531): warning C5105: macro expansion \
|
||||||
producing 'defined' has undefined behavior */
|
producing 'defined' has undefined behavior */
|
||||||
#endif
|
#endif
|
||||||
#if _MSC_VER > 1930
|
#if _MSC_VER > 1930
|
||||||
#pragma warning(disable : 6235) /* <expression> is always a constant */
|
#pragma warning(disable : 6235) /* <expression> is always a constant */
|
||||||
@ -101,16 +101,16 @@
|
|||||||
#pragma warning(disable : 4710) /* 'xyz': function not inlined */
|
#pragma warning(disable : 4710) /* 'xyz': function not inlined */
|
||||||
#pragma warning(disable : 4711) /* function 'xyz' selected for automatic \
|
#pragma warning(disable : 4711) /* function 'xyz' selected for automatic \
|
||||||
inline expansion */
|
inline expansion */
|
||||||
#pragma warning( \
|
#pragma warning(disable : 4201) /* nonstandard extension used: nameless \
|
||||||
disable : 4201) /* nonstandard extension used : nameless struct / union */
|
struct/union */
|
||||||
#pragma warning(disable : 4702) /* unreachable code */
|
#pragma warning(disable : 4702) /* unreachable code */
|
||||||
#pragma warning(disable : 4706) /* assignment within conditional expression */
|
#pragma warning(disable : 4706) /* assignment within conditional expression */
|
||||||
#pragma warning(disable : 4127) /* conditional expression is constant */
|
#pragma warning(disable : 4127) /* conditional expression is constant */
|
||||||
#pragma warning(disable : 4324) /* 'xyz': structure was padded due to \
|
#pragma warning(disable : 4324) /* 'xyz': structure was padded due to \
|
||||||
alignment specifier */
|
alignment specifier */
|
||||||
#pragma warning(disable : 4310) /* cast truncates constant value */
|
#pragma warning(disable : 4310) /* cast truncates constant value */
|
||||||
#pragma warning( \
|
#pragma warning(disable : 4820) /* bytes padding added after data member for \
|
||||||
disable : 4820) /* bytes padding added after data member for alignment */
|
alignment */
|
||||||
#pragma warning(disable : 4548) /* expression before comma has no effect; \
|
#pragma warning(disable : 4548) /* expression before comma has no effect; \
|
||||||
expected expression with side - effect */
|
expected expression with side - effect */
|
||||||
#pragma warning(disable : 4366) /* the result of the unary '&' operator may be \
|
#pragma warning(disable : 4366) /* the result of the unary '&' operator may be \
|
||||||
@ -120,8 +120,8 @@
|
|||||||
#pragma warning(disable : 4204) /* nonstandard extension used: non-constant \
|
#pragma warning(disable : 4204) /* nonstandard extension used: non-constant \
|
||||||
aggregate initializer */
|
aggregate initializer */
|
||||||
#pragma warning( \
|
#pragma warning( \
|
||||||
disable : 4505) /* unreferenced local function has been removed */
|
disable : 4505) /* unreferenced local function has been removed */
|
||||||
#endif /* _MSC_VER (warnings) */
|
#endif /* _MSC_VER (warnings) */
|
||||||
|
|
||||||
#if defined(__GNUC__) && __GNUC__ < 9
|
#if defined(__GNUC__) && __GNUC__ < 9
|
||||||
#pragma GCC diagnostic ignored "-Wattributes"
|
#pragma GCC diagnostic ignored "-Wattributes"
|
||||||
|
@ -246,8 +246,12 @@ typedef struct osal_mmap {
|
|||||||
} osal_mmap_t;
|
} osal_mmap_t;
|
||||||
|
|
||||||
typedef union bin128 {
|
typedef union bin128 {
|
||||||
__anonymous_struct_extension__ struct { uint64_t x, y; };
|
__anonymous_struct_extension__ struct {
|
||||||
__anonymous_struct_extension__ struct { uint32_t a, b, c, d; };
|
uint64_t x, y;
|
||||||
|
};
|
||||||
|
__anonymous_struct_extension__ struct {
|
||||||
|
uint32_t a, b, c, d;
|
||||||
|
};
|
||||||
} bin128_t;
|
} bin128_t;
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(_WIN64)
|
#if defined(_WIN32) || defined(_WIN64)
|
||||||
|
@ -111,8 +111,8 @@
|
|||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
#pragma warning(disable : 4201) /* nonstandard extension used : \
|
#pragma warning(disable : 4201) /* nonstandard extension used: nameless \
|
||||||
nameless struct / union */
|
struct/union */
|
||||||
#pragma warning(disable : 4127) /* conditional expression is constant */
|
#pragma warning(disable : 4127) /* conditional expression is constant */
|
||||||
#if _MSC_VER < 1900
|
#if _MSC_VER < 1900
|
||||||
#pragma warning(disable : 4510) /* default constructor could \
|
#pragma warning(disable : 4510) /* default constructor could \
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
#if _MSC_FULL_VER < 190024215
|
#if _MSC_FULL_VER < 190024215
|
||||||
#pragma message( \
|
#pragma message( \
|
||||||
"It is recommended to use Visual Studio 2015 (MSC 19.0) or newer.")
|
"It is recommended to use Visual Studio 2015 (MSC 19.0) or newer.")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define bswap64(v) _byteswap_uint64(v)
|
#define bswap64(v) _byteswap_uint64(v)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user