Skip to content

Commit

Permalink
fix more warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
canepat committed Jan 24, 2024
1 parent d1c3741 commit a5597c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions silkworm/node/db/db_utils_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ namespace silkworm::db {
TEST_CASE("db access layer addendum") {
TemporaryDirectory tmp_dir;

db::EnvConfig db_config{tmp_dir.path().string(), /*create*/ true};
db_config.in_memory = true;
db::EnvConfig db_config{.path = tmp_dir.path().string(), .create = true, .in_memory = true};

auto db = db::open_env(db_config);
db::RWAccess rw_access(db);
Expand Down
6 changes: 4 additions & 2 deletions silkworm/node/db/mdbx.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,8 @@ class RWTxnUnmanaged : public RWTxn, protected ::mdbx::txn {
//! \brief This class create ROTxn(s) on demand, it is used to enforce in some method signatures the type of db access
class ROAccess {
public:
explicit ROAccess(mdbx::env env) : env_{std::move(env)} {}
explicit ROAccess(const mdbx::env& env) : env_{env} {}
explicit ROAccess(mdbx::env&& env) : env_{std::move(env)} {}
ROAccess(const ROAccess&) noexcept = default;
ROAccess(ROAccess&&) noexcept = default;

Expand All @@ -353,7 +354,8 @@ class ROAccess {
//! \brief This class create RWTxn(s) on demand, it is used to enforce in some method signatures the type of db access
class RWAccess : public ROAccess {
public:
explicit RWAccess(mdbx::env env) : ROAccess{std::move(env)} {}
explicit RWAccess(const mdbx::env& env) : ROAccess{env} {}
explicit RWAccess(mdbx::env&& env) : ROAccess{std::move(env)} {}
RWAccess(const RWAccess&) noexcept = default;
RWAccess(RWAccess&&) noexcept = default;

Expand Down

0 comments on commit a5597c8

Please sign in to comment.