From 99c9bc2411028d6932ee7025a94399e9ea512a7f 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: Wed, 19 Apr 2023 11:02:53 +0300 Subject: [PATCH] =?UTF-8?q?mdbx:=20=D0=B8=D1=81=D0=BF=D0=BE=D0=BB=D1=8C?= =?UTF-8?q?=D0=B7=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20clang-format-16.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mdbx.h++ | 10 +++++----- src/core.c | 4 ++-- src/internals.h | 16 ++++++++-------- src/osal.h | 8 ++++++-- test/base.h++ | 4 ++-- test/utils.h++ | 2 +- 6 files changed, 24 insertions(+), 20 deletions(-) diff --git a/mdbx.h++ b/mdbx.h++ index 4958f857..ac956790 100644 --- a/mdbx.h++ +++ b/mdbx.h++ @@ -591,11 +591,11 @@ concept ImmutableByteProducer = requires(const T &a, char array[42]) { * \interface SliceTranscoder * \brief SliceTranscoder C++20 concept */ template -concept SliceTranscoder = ImmutableByteProducer && - requires(const slice &source, const T &a) { - T(source); - { a.is_erroneous() } -> std::same_as; -}; +concept SliceTranscoder = + ImmutableByteProducer && requires(const slice &source, const T &a) { + T(source); + { a.is_erroneous() } -> std::same_as; + }; #endif /* MDBX_HAVE_CXX20_CONCEPTS */ diff --git a/src/core.c b/src/core.c index 9bc1ef23..24120404 100644 --- a/src/core.c +++ b/src/core.c @@ -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, 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; #if __has_builtin(__builtin_cpu_init) || defined(__BUILTIN_CPU_INIT__) || \ __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, 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; switch (op) { diff --git a/src/internals.h b/src/internals.h index 7bd0f96d..1664dcd7 100644 --- a/src/internals.h +++ b/src/internals.h @@ -90,8 +90,8 @@ #endif #if _MSC_VER > 1914 #pragma warning( \ - disable : 5105) /* winbase.h(9531): warning C5105: macro expansion \ - producing 'defined' has undefined behavior */ + disable : 5105) /* winbase.h(9531): warning C5105: macro expansion \ + producing 'defined' has undefined behavior */ #endif #if _MSC_VER > 1930 #pragma warning(disable : 6235) /* is always a constant */ @@ -101,16 +101,16 @@ #pragma warning(disable : 4710) /* 'xyz': function not inlined */ #pragma warning(disable : 4711) /* function 'xyz' selected for automatic \ inline expansion */ -#pragma warning( \ - disable : 4201) /* nonstandard extension used : nameless struct / union */ +#pragma warning(disable : 4201) /* nonstandard extension used: nameless \ + struct/union */ #pragma warning(disable : 4702) /* unreachable code */ #pragma warning(disable : 4706) /* assignment within conditional expression */ #pragma warning(disable : 4127) /* conditional expression is constant */ #pragma warning(disable : 4324) /* 'xyz': structure was padded due to \ alignment specifier */ #pragma warning(disable : 4310) /* cast truncates constant value */ -#pragma warning( \ - disable : 4820) /* bytes padding added after data member for alignment */ +#pragma warning(disable : 4820) /* bytes padding added after data member for \ + alignment */ #pragma warning(disable : 4548) /* expression before comma has no effect; \ expected expression with side - effect */ #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 \ aggregate initializer */ #pragma warning( \ - disable : 4505) /* unreferenced local function has been removed */ -#endif /* _MSC_VER (warnings) */ + disable : 4505) /* unreferenced local function has been removed */ +#endif /* _MSC_VER (warnings) */ #if defined(__GNUC__) && __GNUC__ < 9 #pragma GCC diagnostic ignored "-Wattributes" diff --git a/src/osal.h b/src/osal.h index 4e228ed7..3d45da4b 100644 --- a/src/osal.h +++ b/src/osal.h @@ -246,8 +246,12 @@ typedef struct osal_mmap { } osal_mmap_t; typedef union bin128 { - __anonymous_struct_extension__ struct { uint64_t x, y; }; - __anonymous_struct_extension__ struct { uint32_t a, b, c, d; }; + __anonymous_struct_extension__ struct { + uint64_t x, y; + }; + __anonymous_struct_extension__ struct { + uint32_t a, b, c, d; + }; } bin128_t; #if defined(_WIN32) || defined(_WIN64) diff --git a/test/base.h++ b/test/base.h++ index f3a7701e..60ab7812 100644 --- a/test/base.h++ +++ b/test/base.h++ @@ -111,8 +111,8 @@ #ifdef _MSC_VER #pragma warning(pop) -#pragma warning(disable : 4201) /* nonstandard extension used : \ - nameless struct / union */ +#pragma warning(disable : 4201) /* nonstandard extension used: nameless \ + struct/union */ #pragma warning(disable : 4127) /* conditional expression is constant */ #if _MSC_VER < 1900 #pragma warning(disable : 4510) /* default constructor could \ diff --git a/test/utils.h++ b/test/utils.h++ index 98763536..4e91226d 100644 --- a/test/utils.h++ +++ b/test/utils.h++ @@ -41,7 +41,7 @@ #if _MSC_FULL_VER < 190024215 #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 #define bswap64(v) _byteswap_uint64(v)