chore: Move sharedPtrBackend (#2974)

This commit is contained in:
Ayaz Salikhov
2026-03-05 19:01:57 +00:00
committed by GitHub
parent a4d6caf8a7
commit 6d56ed5ccf
40 changed files with 83 additions and 82 deletions

View File

@@ -63,7 +63,7 @@ public:
template <typename CtxType>
CacheLoaderImpl(
CtxType& ctx,
std::shared_ptr<BackendInterface> const& backend,
std::shared_ptr<BackendInterface> backend,
CacheType& cache,
uint32_t const seq,
std::size_t const numCacheMarkers,
@@ -71,7 +71,7 @@ public:
std::vector<CursorPair> const& cursors
)
: ctx_{ctx}
, backend_{backend}
, backend_{std::move(backend)}
, cache_{std::ref(cache)}
, queue_{cursors.size()}
, remaining_{cursors.size()}

View File

@@ -42,11 +42,11 @@ class CursorFromAccountProvider : public BaseCursorProvider {
public:
CursorFromAccountProvider(
std::shared_ptr<BackendInterface> const& backend,
std::shared_ptr<BackendInterface> backend,
size_t numCursors,
size_t pageSize
)
: backend_{backend}, numCursors_{numCursors}, pageSize_{pageSize}
: backend_{std::move(backend)}, numCursors_{numCursors}, pageSize_{pageSize}
{
}

View File

@@ -42,8 +42,8 @@ class CursorFromDiffProvider : public BaseCursorProvider {
size_t numCursors_;
public:
CursorFromDiffProvider(std::shared_ptr<BackendInterface> const& backend, size_t numCursors)
: backend_{backend}, numCursors_{numCursors}
CursorFromDiffProvider(std::shared_ptr<BackendInterface> backend, size_t numCursors)
: backend_{std::move(backend)}, numCursors_{numCursors}
{
}

View File

@@ -45,8 +45,8 @@ class CursorFromFixDiffNumProvider : public BaseCursorProvider {
size_t numDiffs_;
public:
CursorFromFixDiffNumProvider(std::shared_ptr<BackendInterface> const& backend, size_t numDiffs)
: backend_{backend}, numDiffs_{numDiffs}
CursorFromFixDiffNumProvider(std::shared_ptr<BackendInterface> backend, size_t numDiffs)
: backend_{std::move(backend)}, numDiffs_{numDiffs}
{
}

View File

@@ -87,14 +87,14 @@ public:
*/
RPCEngine(
util::config::ClioConfigDefinition const& config,
std::shared_ptr<BackendInterface> const& backend,
std::shared_ptr<BackendInterface> backend,
std::shared_ptr<etl::LoadBalancerInterface> const& balancer,
web::dosguard::DOSGuardInterface const& dosGuard,
WorkQueue& workQueue,
CountersType& counters,
std::shared_ptr<HandlerProvider const> const& handlerProvider
)
: backend_{backend}
: backend_{std::move(backend)}
, dosGuard_{std::cref(dosGuard)}
, workQueue_{std::ref(workQueue)}
, counters_{std::ref(counters)}

View File

@@ -87,10 +87,10 @@ public:
* @param amendmentCenter The amendmentCenter to use
*/
AMMInfoHandler(
std::shared_ptr<BackendInterface> const& sharedPtrBackend,
std::shared_ptr<BackendInterface> sharedPtrBackend,
std::shared_ptr<data::AmendmentCenterInterface const> const& amendmentCenter
)
: sharedPtrBackend_(sharedPtrBackend), amendmentCenter_{amendmentCenter}
: sharedPtrBackend_(std::move(sharedPtrBackend)), amendmentCenter_{amendmentCenter}
{
}

View File

@@ -108,8 +108,8 @@ public:
*
* @param sharedPtrBackend The backend to use
*/
AccountChannelsHandler(std::shared_ptr<BackendInterface> const& sharedPtrBackend)
: sharedPtrBackend_(sharedPtrBackend)
AccountChannelsHandler(std::shared_ptr<BackendInterface> sharedPtrBackend)
: sharedPtrBackend_(std::move(sharedPtrBackend))
{
}

View File

@@ -77,8 +77,8 @@ public:
*
* @param sharedPtrBackend The backend to use
*/
AccountCurrenciesHandler(std::shared_ptr<BackendInterface> const& sharedPtrBackend)
: sharedPtrBackend_(sharedPtrBackend)
AccountCurrenciesHandler(std::shared_ptr<BackendInterface> sharedPtrBackend)
: sharedPtrBackend_(std::move(sharedPtrBackend))
{
}

View File

@@ -91,10 +91,10 @@ public:
* @param amendmentCenter The amendment center to use
*/
AccountInfoHandler(
std::shared_ptr<BackendInterface> const& sharedPtrBackend,
std::shared_ptr<BackendInterface> sharedPtrBackend,
std::shared_ptr<data::AmendmentCenterInterface const> const& amendmentCenter
)
: sharedPtrBackend_(sharedPtrBackend), amendmentCenter_{amendmentCenter}
: sharedPtrBackend_(std::move(sharedPtrBackend)), amendmentCenter_{amendmentCenter}
{
}

View File

@@ -114,8 +114,8 @@ public:
*
* @param sharedPtrBackend The backend to use
*/
AccountLinesHandler(std::shared_ptr<BackendInterface> const& sharedPtrBackend)
: sharedPtrBackend_(sharedPtrBackend)
AccountLinesHandler(std::shared_ptr<BackendInterface> sharedPtrBackend)
: sharedPtrBackend_(std::move(sharedPtrBackend))
{
}

View File

@@ -83,8 +83,8 @@ public:
*
* @param sharedPtrBackend The backend to use
*/
AccountNFTsHandler(std::shared_ptr<BackendInterface> const& sharedPtrBackend)
: sharedPtrBackend_(sharedPtrBackend)
AccountNFTsHandler(std::shared_ptr<BackendInterface> sharedPtrBackend)
: sharedPtrBackend_(std::move(sharedPtrBackend))
{
}

View File

@@ -90,8 +90,8 @@ public:
*
* @param sharedPtrBackend The backend to use
*/
AccountObjectsHandler(std::shared_ptr<BackendInterface> const& sharedPtrBackend)
: sharedPtrBackend_(sharedPtrBackend)
AccountObjectsHandler(std::shared_ptr<BackendInterface> sharedPtrBackend)
: sharedPtrBackend_(std::move(sharedPtrBackend))
{
}

View File

@@ -97,8 +97,8 @@ public:
*
* @param sharedPtrBackend The backend to use
*/
AccountOffersHandler(std::shared_ptr<BackendInterface> const& sharedPtrBackend)
: sharedPtrBackend_(sharedPtrBackend)
AccountOffersHandler(std::shared_ptr<BackendInterface> sharedPtrBackend)
: sharedPtrBackend_(std::move(sharedPtrBackend))
{
}

View File

@@ -115,10 +115,10 @@ public:
* @param etl The ETL service to use
*/
AccountTxHandler(
std::shared_ptr<BackendInterface> const& sharedPtrBackend,
std::shared_ptr<BackendInterface> sharedPtrBackend,
std::shared_ptr<etl::ETLServiceInterface const> const& etl
)
: sharedPtrBackend_(sharedPtrBackend), etl_{etl}
: sharedPtrBackend_(std::move(sharedPtrBackend)), etl_{etl}
{
}

View File

@@ -75,8 +75,8 @@ public:
*
* @param sharedPtrBackend The backend to use
*/
BookChangesHandler(std::shared_ptr<BackendInterface> const& sharedPtrBackend)
: sharedPtrBackend_(sharedPtrBackend)
BookChangesHandler(std::shared_ptr<BackendInterface> sharedPtrBackend)
: sharedPtrBackend_(std::move(sharedPtrBackend))
{
}

View File

@@ -98,10 +98,10 @@ public:
* @param amendmentCenter The amendmentCenter to use
*/
BookOffersHandler(
std::shared_ptr<BackendInterface> const& sharedPtrBackend,
std::shared_ptr<BackendInterface> sharedPtrBackend,
std::shared_ptr<data::AmendmentCenterInterface const> const& amendmentCenter
)
: sharedPtrBackend_(sharedPtrBackend), amendmentCenter_{amendmentCenter}
: sharedPtrBackend_(std::move(sharedPtrBackend)), amendmentCenter_{amendmentCenter}
{
}

View File

@@ -86,8 +86,8 @@ public:
*
* @param sharedPtrBackend The backend to use
*/
DepositAuthorizedHandler(std::shared_ptr<BackendInterface> const& sharedPtrBackend)
: sharedPtrBackend_(sharedPtrBackend)
DepositAuthorizedHandler(std::shared_ptr<BackendInterface> sharedPtrBackend)
: sharedPtrBackend_(std::move(sharedPtrBackend))
{
}

View File

@@ -84,14 +84,14 @@ public:
/**
* @brief Construct a new FeatureHandler object
*
* @param backend The backend to use
* @param sharedPtrBackend The backend to use
* @param amendmentCenter The amendment center to use
*/
FeatureHandler(
std::shared_ptr<BackendInterface> const& backend,
std::shared_ptr<BackendInterface> sharedPtrBackend,
std::shared_ptr<data::AmendmentCenterInterface const> const& amendmentCenter
)
: sharedPtrBackend_(backend), amendmentCenter_(amendmentCenter)
: sharedPtrBackend_(std::move(sharedPtrBackend)), amendmentCenter_(amendmentCenter)
{
}

View File

@@ -95,8 +95,8 @@ public:
*
* @param sharedPtrBackend The backend to use
*/
GatewayBalancesHandler(std::shared_ptr<BackendInterface> const& sharedPtrBackend)
: sharedPtrBackend_(sharedPtrBackend)
GatewayBalancesHandler(std::shared_ptr<BackendInterface> sharedPtrBackend)
: sharedPtrBackend_(std::move(sharedPtrBackend))
{
}

View File

@@ -105,8 +105,8 @@ public:
*
* @param sharedPtrBackend The backend to use
*/
GetAggregatePriceHandler(std::shared_ptr<BackendInterface> const& sharedPtrBackend)
: sharedPtrBackend_(sharedPtrBackend)
GetAggregatePriceHandler(std::shared_ptr<BackendInterface> sharedPtrBackend)
: sharedPtrBackend_(std::move(sharedPtrBackend))
{
}

View File

@@ -95,10 +95,11 @@ public:
* @param amendmentCenter The amendmentCenter to use
*/
LedgerHandler(
std::shared_ptr<BackendInterface> const& sharedPtrBackend,
std::shared_ptr<BackendInterface> sharedPtrBackend,
std::shared_ptr<data::AmendmentCenterInterface const> amendmentCenter
)
: sharedPtrBackend_(sharedPtrBackend), amendmentCenter_(std::move(amendmentCenter))
: sharedPtrBackend_(std::move(sharedPtrBackend))
, amendmentCenter_(std::move(amendmentCenter))
{
}

View File

@@ -97,8 +97,8 @@ public:
*
* @param sharedPtrBackend The backend to use
*/
LedgerDataHandler(std::shared_ptr<BackendInterface> const& sharedPtrBackend)
: sharedPtrBackend_(sharedPtrBackend)
LedgerDataHandler(std::shared_ptr<BackendInterface> sharedPtrBackend)
: sharedPtrBackend_(std::move(sharedPtrBackend))
{
}

View File

@@ -125,8 +125,8 @@ public:
*
* @param sharedPtrBackend The backend to use
*/
LedgerEntryHandler(std::shared_ptr<BackendInterface> const& sharedPtrBackend)
: sharedPtrBackend_(sharedPtrBackend)
LedgerEntryHandler(std::shared_ptr<BackendInterface> sharedPtrBackend)
: sharedPtrBackend_(std::move(sharedPtrBackend))
{
}

View File

@@ -67,8 +67,8 @@ public:
*
* @param sharedPtrBackend The backend to use
*/
LedgerIndexHandler(std::shared_ptr<BackendInterface> const& sharedPtrBackend)
: sharedPtrBackend_(sharedPtrBackend)
LedgerIndexHandler(std::shared_ptr<BackendInterface> sharedPtrBackend)
: sharedPtrBackend_(std::move(sharedPtrBackend))
{
}

View File

@@ -55,8 +55,8 @@ public:
*
* @param sharedPtrBackend The backend to use
*/
LedgerRangeHandler(std::shared_ptr<BackendInterface> const& sharedPtrBackend)
: sharedPtrBackend_(sharedPtrBackend)
LedgerRangeHandler(std::shared_ptr<BackendInterface> sharedPtrBackend)
: sharedPtrBackend_(std::move(sharedPtrBackend))
{
}

View File

@@ -80,8 +80,8 @@ public:
*
* @param sharedPtrBackend The backend to use
*/
MPTHoldersHandler(std::shared_ptr<BackendInterface> const& sharedPtrBackend)
: sharedPtrBackend_(sharedPtrBackend)
MPTHoldersHandler(std::shared_ptr<BackendInterface> sharedPtrBackend)
: sharedPtrBackend_(std::move(sharedPtrBackend))
{
}

View File

@@ -39,7 +39,7 @@ public:
*
* @param sharedPtrBackend The backend to use
*/
NFTBuyOffersHandler(std::shared_ptr<BackendInterface> const& sharedPtrBackend)
NFTBuyOffersHandler(std::shared_ptr<BackendInterface> sharedPtrBackend)
: NFTOffersHandlerBase(sharedPtrBackend)
{
}

View File

@@ -106,8 +106,8 @@ public:
*
* @param sharedPtrBackend The backend to use
*/
NFTHistoryHandler(std::shared_ptr<BackendInterface> const& sharedPtrBackend)
: sharedPtrBackend_(sharedPtrBackend)
NFTHistoryHandler(std::shared_ptr<BackendInterface> sharedPtrBackend)
: sharedPtrBackend_(std::move(sharedPtrBackend))
{
}

View File

@@ -81,8 +81,8 @@ public:
*
* @param sharedPtrBackend The backend to use
*/
NFTInfoHandler(std::shared_ptr<BackendInterface> const& sharedPtrBackend)
: sharedPtrBackend_(sharedPtrBackend)
NFTInfoHandler(std::shared_ptr<BackendInterface> sharedPtrBackend)
: sharedPtrBackend_(std::move(sharedPtrBackend))
{
}

View File

@@ -84,8 +84,8 @@ public:
*
* @param sharedPtrBackend The backend to use
*/
NFTOffersHandlerBase(std::shared_ptr<BackendInterface> const& sharedPtrBackend)
: sharedPtrBackend_(sharedPtrBackend)
NFTOffersHandlerBase(std::shared_ptr<BackendInterface> sharedPtrBackend)
: sharedPtrBackend_(std::move(sharedPtrBackend))
{
}

View File

@@ -39,7 +39,7 @@ public:
*
* @param sharedPtrBackend The backend to use
*/
NFTSellOffersHandler(std::shared_ptr<BackendInterface> const& sharedPtrBackend)
NFTSellOffersHandler(std::shared_ptr<BackendInterface> sharedPtrBackend)
: NFTOffersHandlerBase(sharedPtrBackend)
{
}

View File

@@ -81,8 +81,8 @@ public:
*
* @param sharedPtrBackend The backend to use
*/
NFTsByIssuerHandler(std::shared_ptr<BackendInterface> const& sharedPtrBackend)
: sharedPtrBackend_(sharedPtrBackend)
NFTsByIssuerHandler(std::shared_ptr<BackendInterface> sharedPtrBackend)
: sharedPtrBackend_(std::move(sharedPtrBackend))
{
}

View File

@@ -90,8 +90,8 @@ public:
*
* @param sharedPtrBackend The backend to use
*/
NoRippleCheckHandler(std::shared_ptr<BackendInterface> const& sharedPtrBackend)
: sharedPtrBackend_(sharedPtrBackend)
NoRippleCheckHandler(std::shared_ptr<BackendInterface> sharedPtrBackend)
: sharedPtrBackend_(std::move(sharedPtrBackend))
{
}

View File

@@ -152,16 +152,16 @@ public:
* @param counters The counters to use
*/
BaseServerInfoHandler(
std::shared_ptr<BackendInterface> const& backend,
std::shared_ptr<feed::SubscriptionManagerInterface> const& subscriptions,
std::shared_ptr<etl::LoadBalancerInterface> const& balancer,
std::shared_ptr<etl::ETLServiceInterface const> const& etl,
std::shared_ptr<BackendInterface> backend,
std::shared_ptr<feed::SubscriptionManagerInterface> subscriptions,
std::shared_ptr<etl::LoadBalancerInterface> balancer,
std::shared_ptr<etl::ETLServiceInterface const> etl,
CountersType const& counters
)
: backend_(backend)
, subscriptions_(subscriptions)
, balancer_(balancer)
, etl_(etl)
: backend_(std::move(backend))
, subscriptions_(std::move(subscriptions))
, balancer_(std::move(balancer))
, etl_(std::move(etl))
, counters_(std::cref(counters))
{
}

View File

@@ -54,11 +54,11 @@
namespace rpc {
SubscribeHandler::SubscribeHandler(
std::shared_ptr<BackendInterface> const& sharedPtrBackend,
std::shared_ptr<BackendInterface> sharedPtrBackend,
std::shared_ptr<data::AmendmentCenterInterface const> const& amendmentCenter,
std::shared_ptr<feed::SubscriptionManagerInterface> const& subscriptions
)
: sharedPtrBackend_(sharedPtrBackend)
: sharedPtrBackend_(std::move(sharedPtrBackend))
, amendmentCenter_(amendmentCenter)
, subscriptions_(subscriptions)
{

View File

@@ -105,7 +105,7 @@ public:
* @param subscriptions The subscription manager to use
*/
SubscribeHandler(
std::shared_ptr<BackendInterface> const& sharedPtrBackend,
std::shared_ptr<BackendInterface> sharedPtrBackend,
std::shared_ptr<data::AmendmentCenterInterface const> const& amendmentCenter,
std::shared_ptr<feed::SubscriptionManagerInterface> const& subscriptions
);

View File

@@ -79,8 +79,8 @@ public:
*
* @param sharedPtrBackend The backend to use
*/
TransactionEntryHandler(std::shared_ptr<BackendInterface> const& sharedPtrBackend)
: sharedPtrBackend_(sharedPtrBackend)
TransactionEntryHandler(std::shared_ptr<BackendInterface> sharedPtrBackend)
: sharedPtrBackend_(std::move(sharedPtrBackend))
{
}

View File

@@ -107,10 +107,10 @@ public:
* @param etl The ETL service to use
*/
TxHandler(
std::shared_ptr<BackendInterface> const& sharedPtrBackend,
std::shared_ptr<BackendInterface> sharedPtrBackend,
std::shared_ptr<etl::ETLServiceInterface const> const& etl
)
: sharedPtrBackend_(sharedPtrBackend), etl_(etl)
: sharedPtrBackend_(std::move(sharedPtrBackend)), etl_(etl)
{
}

View File

@@ -70,7 +70,7 @@ validate(VaultInfoHandler::Input const& input)
} // namespace
VaultInfoHandler::VaultInfoHandler(std::shared_ptr<BackendInterface> const& sharedPtrBackend)
VaultInfoHandler::VaultInfoHandler(std::shared_ptr<BackendInterface> sharedPtrBackend)
: sharedPtrBackend_{sharedPtrBackend}
{
}

View File

@@ -52,7 +52,7 @@ public:
*
* @param sharedPtrBackend The backend to use
*/
VaultInfoHandler(std::shared_ptr<BackendInterface> const& sharedPtrBackend);
VaultInfoHandler(std::shared_ptr<BackendInterface> sharedPtrBackend);
/**
* @brief A struct to hold the input data for the command