mdbx: новые настройки clang-format (косметика).

This commit is contained in:
Леонид Юрьев (Leonid Yuriev)
2024-12-11 21:22:04 +03:00
parent 3c4d019d00
commit 8867c2ddc2
129 changed files with 6727 additions and 12640 deletions

View File

@@ -10,14 +10,11 @@ int main(int argc, const char *argv[]) {
mdbx::path db_filename = "test-dupfix-multiple";
mdbx::env_managed::remove(db_filename);
mdbx::env_managed env(db_filename, mdbx::env_managed::create_parameters(),
mdbx::env::operate_parameters());
mdbx::env_managed env(db_filename, mdbx::env_managed::create_parameters(), mdbx::env::operate_parameters());
using buffer =
mdbx::buffer<mdbx::default_allocator, mdbx::default_capacity_policy>;
using buffer = mdbx::buffer<mdbx::default_allocator, mdbx::default_capacity_policy>;
auto txn = env.start_write();
auto map = txn.create_map(nullptr, mdbx::key_mode::ordinal,
mdbx::value_mode::single);
auto map = txn.create_map(nullptr, mdbx::key_mode::ordinal, mdbx::value_mode::single);
#if 0 /* workaround */
txn.commit();
env.close();
@@ -39,14 +36,10 @@ int main(int argc, const char *argv[]) {
txn = env.start_read();
auto cursor = txn.open_cursor(map);
#if defined(__cpp_lib_string_view) && __cpp_lib_string_view >= 201606L
if (cursor.to_first().value.string_view() == "a" &&
cursor.to_next().value.string_view() == "b" &&
cursor.to_next().value.string_view() == "c" &&
cursor.to_next().value.string_view() == "d" &&
cursor.to_next().value.string_view() == "e" &&
cursor.to_next().value.string_view() == "f" &&
cursor.to_next().value.string_view() == "g" &&
cursor.to_next().value.string_view() == "h" &&
if (cursor.to_first().value.string_view() == "a" && cursor.to_next().value.string_view() == "b" &&
cursor.to_next().value.string_view() == "c" && cursor.to_next().value.string_view() == "d" &&
cursor.to_next().value.string_view() == "e" && cursor.to_next().value.string_view() == "f" &&
cursor.to_next().value.string_view() == "g" && cursor.to_next().value.string_view() == "h" &&
!cursor.to_next(false).done && cursor.eof()) {
std::cout << "OK\n";
return EXIT_SUCCESS;