mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
chore: Enable clang-tidy coreguidelines checks (#6698)
Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com>
This commit is contained in:
@@ -231,7 +231,7 @@ struct Peer
|
||||
// Number of proposers in the prior round
|
||||
std::size_t prevProposers = 0;
|
||||
// Duration of prior round
|
||||
std::chrono::milliseconds prevRoundTime;
|
||||
std::chrono::milliseconds prevRoundTime{};
|
||||
|
||||
// Quorum of validations needed for a ledger to be fully validated
|
||||
// TODO: Use the logic in ValidatorList to set this dynamically
|
||||
@@ -501,16 +501,10 @@ struct Peer
|
||||
NetClock::duration const& closeResolution,
|
||||
ConsensusCloseTimes const& rawCloseTimes,
|
||||
ConsensusMode const& mode,
|
||||
Json::Value&& consensusJson)
|
||||
Json::Value const& consensusJson)
|
||||
{
|
||||
onAccept(
|
||||
result,
|
||||
prevLedger,
|
||||
closeResolution,
|
||||
rawCloseTimes,
|
||||
mode,
|
||||
std::move(consensusJson),
|
||||
validating());
|
||||
result, prevLedger, closeResolution, rawCloseTimes, mode, consensusJson, validating());
|
||||
}
|
||||
|
||||
void
|
||||
@@ -520,10 +514,10 @@ struct Peer
|
||||
NetClock::duration const& closeResolution,
|
||||
ConsensusCloseTimes const& rawCloseTimes,
|
||||
ConsensusMode const& mode,
|
||||
Json::Value&& consensusJson,
|
||||
Json::Value const& consensusJson,
|
||||
bool const validating)
|
||||
{
|
||||
schedule(delays.ledgerAccept, [=, this]() {
|
||||
schedule(delays.ledgerAccept, [mode, result, prevLedger, closeResolution, this]() {
|
||||
bool const proposing = mode == ConsensusMode::proposing;
|
||||
bool const consensusFail = result.state == ConsensusState::MovedOn;
|
||||
|
||||
|
||||
@@ -100,7 +100,8 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
TxSet(MutableTxSet&& m) : txs_{std::move(m.txs_)}, id_{calcID(txs_)}
|
||||
TxSet(MutableTxSet&& m) // NOLINT(cppcoreguidelines-rvalue-reference-param-not-moved)
|
||||
: txs_{m.txs_}, id_{calcID(txs_)}
|
||||
{
|
||||
}
|
||||
|
||||
@@ -161,7 +162,7 @@ private:
|
||||
TxSetType txs_;
|
||||
|
||||
//! The unique ID of this tx set
|
||||
ID id_;
|
||||
ID id_{};
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -24,7 +24,7 @@ private:
|
||||
operator=(SignSubmitRunner&&) = delete;
|
||||
|
||||
SignSubmitRunner(Env& env, JTx&& jt, std::source_location loc)
|
||||
: env_(env), jt_(jt), loc_(loc)
|
||||
: env_(env), jt_(std::move(jt)), loc_(loc)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ private:
|
||||
static inline std::uint32_t fee = 0;
|
||||
Env& env_;
|
||||
AccountID owner_;
|
||||
std::uint32_t documentID_;
|
||||
std::uint32_t documentID_{};
|
||||
|
||||
private:
|
||||
void
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace detail {
|
||||
class flags_helper
|
||||
{
|
||||
protected:
|
||||
std::uint32_t mask_;
|
||||
std::uint32_t mask_{0};
|
||||
|
||||
private:
|
||||
void
|
||||
@@ -79,7 +79,7 @@ private:
|
||||
|
||||
protected:
|
||||
template <class... Args>
|
||||
flags_helper(Args... args) : mask_(0)
|
||||
flags_helper(Args... args)
|
||||
{
|
||||
set_args(args...);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace test {
|
||||
namespace jtx {
|
||||
namespace oracle {
|
||||
|
||||
Oracle::Oracle(Env& env, CreateArg const& arg, bool submit) : env_(env), documentID_{}
|
||||
Oracle::Oracle(Env& env, CreateArg const& arg, bool submit) : env_(env)
|
||||
{
|
||||
// LastUpdateTime is checked to be in range
|
||||
// {close-maxLastUpdateTimeDelta, close+maxLastUpdateTimeDelta}.
|
||||
|
||||
@@ -8,12 +8,14 @@ namespace test {
|
||||
namespace jtx {
|
||||
|
||||
qualityInPercent::qualityInPercent(double percent)
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-use-default-member-init)
|
||||
: qIn_(static_cast<std::uint32_t>((percent / 100) * QUALITY_ONE))
|
||||
{
|
||||
assert(percent <= 400 && percent >= 0);
|
||||
}
|
||||
|
||||
qualityOutPercent::qualityOutPercent(double percent)
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-use-default-member-init)
|
||||
: qOut_(static_cast<std::uint32_t>((percent / 100) * QUALITY_ONE))
|
||||
{
|
||||
assert(percent <= 400 && percent >= 0);
|
||||
|
||||
@@ -413,7 +413,6 @@ XChainBridgeObjects::XChainBridgeObjects()
|
||||
}
|
||||
return r;
|
||||
}())
|
||||
, quorum(UT_XCHAIN_DEFAULT_QUORUM)
|
||||
, reward(XRP(1))
|
||||
, split_reward_quorum(divide(reward, STAmount(UT_XCHAIN_DEFAULT_QUORUM), reward.issue()))
|
||||
, split_reward_everyone(divide(reward, STAmount(UT_XCHAIN_DEFAULT_NUM_SIGNERS), reward.issue()))
|
||||
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
class qualityInPercent
|
||||
{
|
||||
private:
|
||||
std::uint32_t qIn_;
|
||||
std::uint32_t qIn_; // NOLINT(cppcoreguidelines-use-default-member-init)
|
||||
|
||||
public:
|
||||
explicit qualityInPercent(double percent);
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
class qualityOutPercent
|
||||
{
|
||||
private:
|
||||
std::uint32_t qOut_;
|
||||
std::uint32_t qOut_; // NOLINT(cppcoreguidelines-use-default-member-init)
|
||||
|
||||
public:
|
||||
explicit qualityOutPercent(double percent);
|
||||
|
||||
@@ -170,7 +170,7 @@ struct XChainBridgeObjects
|
||||
std::vector<signer> const alt_signers;
|
||||
std::vector<Account> const payee;
|
||||
std::vector<Account> const payees;
|
||||
std::uint32_t const quorum;
|
||||
std::uint32_t const quorum{UT_XCHAIN_DEFAULT_QUORUM};
|
||||
|
||||
STAmount const reward; // 1 xrp
|
||||
STAmount const split_reward_quorum; // 250,000 drops
|
||||
|
||||
Reference in New Issue
Block a user