mirror of
https://github.com/isar/libmdbx.git
synced 2025-10-14 14:02:48 +08:00
mdbx: новые настройки clang-format (косметика).
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user