mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-22 23:00:55 +00:00
chore: Enable clang-tidy misc checks (#6655)
This commit is contained in:
@@ -677,13 +677,13 @@ AMM::bid(BidArg const& arg)
|
||||
};
|
||||
if (arg.bidMin)
|
||||
{
|
||||
STAmount saTokens = getBid(*arg.bidMin);
|
||||
STAmount const saTokens = getBid(*arg.bidMin);
|
||||
saTokens.setJson(jv[jss::BidMin]);
|
||||
bidMin_ = saTokens.iou();
|
||||
}
|
||||
if (arg.bidMax)
|
||||
{
|
||||
STAmount saTokens = getBid(*arg.bidMax);
|
||||
STAmount const saTokens = getBid(*arg.bidMax);
|
||||
saTokens.setJson(jv[jss::BidMax]);
|
||||
bidMax_ = saTokens.iou();
|
||||
}
|
||||
|
||||
@@ -512,7 +512,7 @@ Env::autofill_sig(JTx& jt)
|
||||
{
|
||||
auto& jv = jt.jv;
|
||||
|
||||
scope_success success([&]() {
|
||||
scope_success const success([&]() {
|
||||
// Call all the post-signers after the main signers or autofill are done
|
||||
for (auto const& signer : jt.postSigners)
|
||||
signer(*this, jt);
|
||||
@@ -561,7 +561,7 @@ Env::autofill(JTx& jt)
|
||||
|
||||
if (jt.fill_netid)
|
||||
{
|
||||
uint32_t networkID = app().getNetworkIDService().getNetworkID();
|
||||
uint32_t const networkID = app().getNetworkIDService().getNetworkID();
|
||||
if (!jv.isMember(jss::NetworkID) && networkID > 1024)
|
||||
jv[jss::NetworkID] = std::to_string(networkID);
|
||||
}
|
||||
|
||||
@@ -272,7 +272,7 @@ private:
|
||||
rb_.consume(rb_.size());
|
||||
auto m = std::make_shared<msg>(std::move(jv));
|
||||
{
|
||||
std::lock_guard lock(m_);
|
||||
std::lock_guard const lock(m_);
|
||||
msgs_.push_front(m);
|
||||
cv_.notify_all();
|
||||
}
|
||||
@@ -286,7 +286,7 @@ private:
|
||||
void
|
||||
on_read_done()
|
||||
{
|
||||
std::lock_guard lock(m0_);
|
||||
std::lock_guard const lock(m0_);
|
||||
b0_ = true;
|
||||
cv0_.notify_all();
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ MPTTester::create(MPTCreate const& arg)
|
||||
if (id_)
|
||||
Throw<std::runtime_error>("MPT can't be reused");
|
||||
id_ = makeMptID(env_.seq(issuer_), issuer_);
|
||||
Json::Value jv = createJV(
|
||||
Json::Value const jv = createJV(
|
||||
{.issuer = issuer_,
|
||||
.maxAmt = arg.maxAmt,
|
||||
.assetScale = arg.assetScale,
|
||||
@@ -217,7 +217,7 @@ MPTTester::destroy(MPTDestroy const& arg)
|
||||
{
|
||||
if (!arg.id && !id_)
|
||||
Throw<std::runtime_error>("MPT has not been created");
|
||||
Json::Value jv =
|
||||
Json::Value const jv =
|
||||
destroyJV({.issuer = arg.issuer ? arg.issuer : issuer_, .id = arg.id ? arg.id : id_});
|
||||
submit(arg, jv);
|
||||
}
|
||||
@@ -251,7 +251,7 @@ MPTTester::authorize(MPTAuthorize const& arg)
|
||||
{
|
||||
if (!arg.id && !id_)
|
||||
Throw<std::runtime_error>("MPT has not been created");
|
||||
Json::Value jv = authorizeJV({
|
||||
Json::Value const jv = authorizeJV({
|
||||
.account = arg.account ? arg.account : issuer_,
|
||||
.holder = arg.holder,
|
||||
.id = arg.id ? arg.id : id_,
|
||||
@@ -361,7 +361,7 @@ MPTTester::set(MPTSet const& arg)
|
||||
{
|
||||
if (!arg.id && !id_)
|
||||
Throw<std::runtime_error>("MPT has not been created");
|
||||
Json::Value jv = setJV(
|
||||
Json::Value const jv = setJV(
|
||||
{.account = arg.account ? arg.account : issuer_,
|
||||
.holder = arg.holder,
|
||||
.id = arg.id ? arg.id : id_,
|
||||
|
||||
@@ -78,7 +78,7 @@ msig::operator()(Env& env, JTx& jt) const
|
||||
jo[jss::Account] = e.acct.human();
|
||||
jo[jss::SigningPubKey] = strHex(e.sig.pk().slice());
|
||||
|
||||
Serializer ss{buildMultiSigningData(*st, e.acct.id())};
|
||||
Serializer const ss{buildMultiSigningData(*st, e.acct.id())};
|
||||
auto const sig = xrpl::sign(*publicKeyType(e.sig.pk().slice()), e.sig.sk(), ss.slice());
|
||||
jo[sfTxnSignature.getJsonName()] = strHex(Slice{sig.data(), sig.size()});
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ setupDomain(
|
||||
env.fund(XRP(100000), domainOwner);
|
||||
env.close();
|
||||
|
||||
pdomain::Credentials credentials{{domainOwner, credType}};
|
||||
pdomain::Credentials const credentials{{domainOwner, credType}};
|
||||
env(pdomain::setTx(domainOwner, credentials));
|
||||
|
||||
auto const objects = pdomain::getObjects(domainOwner, env);
|
||||
|
||||
@@ -431,7 +431,7 @@ XChainBridgeObjects::XChainBridgeObjects()
|
||||
void
|
||||
XChainBridgeObjects::createMcBridgeObjects(Env& mcEnv)
|
||||
{
|
||||
STAmount xrp_funds{XRP(10000)};
|
||||
STAmount const xrp_funds{XRP(10000)};
|
||||
mcEnv.fund(xrp_funds, mcDoor, mcAlice, mcBob, mcCarol, mcGw);
|
||||
|
||||
// Signer's list must match the attestation signers
|
||||
@@ -448,7 +448,7 @@ XChainBridgeObjects::createMcBridgeObjects(Env& mcEnv)
|
||||
void
|
||||
XChainBridgeObjects::createScBridgeObjects(Env& scEnv)
|
||||
{
|
||||
STAmount xrp_funds{XRP(10000)};
|
||||
STAmount const xrp_funds{XRP(10000)};
|
||||
scEnv.fund(xrp_funds, scDoor, scAlice, scBob, scCarol, scGw, scAttester, scReward);
|
||||
|
||||
// Signer's list must match the attestation signers
|
||||
|
||||
Reference in New Issue
Block a user