mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-02 16:26:48 +00:00
fix clang-tidy
This commit is contained in:
@@ -9,7 +9,7 @@ namespace xrpl {
|
||||
inline constexpr std::uint32_t kFeeUnitsDeprecated = 10;
|
||||
|
||||
// Number of micro-drops in one drop.
|
||||
constexpr std::uint32_t MICRO_DROPS_PER_DROP{1'000'000};
|
||||
constexpr std::uint32_t microDropsPerDrop{1'000'000};
|
||||
|
||||
/** Reflects the fee settings for a particular ledger.
|
||||
|
||||
|
||||
@@ -198,7 +198,7 @@ Ledger::Ledger(
|
||||
sle->at(sfReserveIncrement) = *f;
|
||||
sle->at(sfReferenceFeeUnits) = kFeeUnitsDeprecated;
|
||||
}
|
||||
if (std::find(amendments.begin(), amendments.end(), featureSmartEscrow) != amendments.end())
|
||||
if (std::ranges::find(amendments, featureSmartEscrow) != amendments.end())
|
||||
{
|
||||
sle->at(sfExtensionComputeLimit) = fees.extensionComputeLimit;
|
||||
sle->at(sfExtensionSizeLimit) = fees.extensionSizeLimit;
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <optional>
|
||||
#include <source_location>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace xrpl::test {
|
||||
|
||||
@@ -32,23 +32,23 @@ namespace xrpl {
|
||||
|
||||
namespace detail {
|
||||
|
||||
template <typename value_type>
|
||||
template <typename ValueType>
|
||||
class VotableValue
|
||||
{
|
||||
private:
|
||||
value_type const current_; // The current setting
|
||||
value_type const target_; // The setting we want
|
||||
std::map<value_type, int> voteMap_;
|
||||
ValueType const current_; // The current setting
|
||||
ValueType const target_; // The setting we want
|
||||
std::map<ValueType, int> voteMap_;
|
||||
|
||||
public:
|
||||
VotableValue(value_type current, value_type target) : current_(current), target_(target)
|
||||
VotableValue(ValueType current, ValueType target) : current_(current), target_(target)
|
||||
{
|
||||
// Add our vote
|
||||
++voteMap_[target_];
|
||||
}
|
||||
|
||||
void
|
||||
addVote(value_type vote)
|
||||
addVote(ValueType vote)
|
||||
{
|
||||
++voteMap_[vote];
|
||||
}
|
||||
@@ -59,21 +59,21 @@ public:
|
||||
addVote(current_);
|
||||
}
|
||||
|
||||
[[nodiscard]] value_type
|
||||
[[nodiscard]] ValueType
|
||||
current() const
|
||||
{
|
||||
return current_;
|
||||
}
|
||||
|
||||
[[nodiscard]] std::pair<value_type, bool>
|
||||
[[nodiscard]] std::pair<ValueType, bool>
|
||||
getVotes() const;
|
||||
};
|
||||
|
||||
template <typename value_type>
|
||||
std::pair<value_type, bool>
|
||||
VotableValue<value_type>::getVotes() const
|
||||
template <typename ValueType>
|
||||
std::pair<ValueType, bool>
|
||||
VotableValue<ValueType>::getVotes() const
|
||||
{
|
||||
value_type ourVote = current_;
|
||||
ValueType ourVote = current_;
|
||||
int weight = 0;
|
||||
for (auto const& [key, val] : voteMap_)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user