diff --git a/include/xrpl/ledger/helpers/AccountRootHelpers.h b/include/xrpl/ledger/helpers/AccountRootHelpers.h index 61d0f33bd4..f1981c536e 100644 --- a/include/xrpl/ledger/helpers/AccountRootHelpers.h +++ b/include/xrpl/ledger/helpers/AccountRootHelpers.h @@ -29,7 +29,7 @@ protected: public: AccountRoot(AccountID const& id, ReadView const& view) - : ReadOnlySLE(view->read(keylet::account(id)), view), id_(id) + : ReadOnlySLE(view.read(keylet::account(id)), view), id_(id) { } @@ -84,7 +84,7 @@ class WritableAccountRoot : public AccountRoot, public WritableSLE { public: WritableAccountRoot(AccountID const& id, ApplyView& view) - : AccountRoot(id, view), WritableSLE(view->peek(keylet::account(id)), view) + : AccountRoot(id, view), WritableSLE(view.peek(keylet::account(id)), view) { } @@ -113,7 +113,7 @@ pseudoAccountAddress(ReadView const& view, uint256 const& pseudoOwnerKey); Pseudo-account designator fields MUST be maintained by including the SField::sMD_PseudoAccount flag in the SField definition. */ -[[nodiscard]] std::vector const& +[[nodiscard]] std::vector const& getPseudoAccountFields(); /** Returns true if and only if sleAcct is a pseudo-account or specific @@ -127,7 +127,7 @@ getPseudoAccountFields(); [[nodiscard]] bool isPseudoAccount( std::shared_ptr sleAcct, - std::set const& pseudoFieldFilter = {}); + std::set const& pseudoFieldFilter = {}); /** Convenience overload that reads the account from the view. */ [[nodiscard]] inline bool diff --git a/include/xrpl/ledger/helpers/WrappedSLEBase.h b/include/xrpl/ledger/helpers/WrappedSLEBase.h index 87f677ce09..5ab8964ecd 100644 --- a/include/xrpl/ledger/helpers/WrappedSLEBase.h +++ b/include/xrpl/ledger/helpers/WrappedSLEBase.h @@ -119,7 +119,7 @@ public: bool canModify() const { - return applyView_ != nullptr && mutableSle_ != nullptr; + return mutableSle_ != nullptr; } /** Returns the apply view for write operations */ @@ -147,28 +147,28 @@ public: insert() { XRPL_ASSERT(canModify(), "xrpl::WritableSLE::insert : can modify"); - applyView_->insert(mutableSle_); + applyView_.insert(mutableSle_); } void erase() { XRPL_ASSERT(canModify(), "xrpl::WritableSLE::erase : can modify"); - applyView_->erase(mutableSle_); + applyView_.erase(mutableSle_); } void update() { XRPL_ASSERT(canModify(), "xrpl::WritableSLE::update : can modify"); - applyView_->update(mutableSle_); + applyView_.update(mutableSle_); } protected: WritableSLE() = default; /** Constructor for read-write context (ApplyView) */ - explicit WritableSLE(std::shared_ptr sle, ApplyView* view) + explicit WritableSLE(std::shared_ptr sle, ApplyView& view) : mutableSle_(std::move(sle)), applyView_(view) { }