diff --git a/include/xrpl/protocol/Fees.h b/include/xrpl/protocol/Fees.h index 4d1bfe6a28..fc6b2bdb3b 100644 --- a/include/xrpl/protocol/Fees.h +++ b/include/xrpl/protocol/Fees.h @@ -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. diff --git a/src/libxrpl/ledger/Ledger.cpp b/src/libxrpl/ledger/Ledger.cpp index 4b083b7430..717b77b17b 100644 --- a/src/libxrpl/ledger/Ledger.cpp +++ b/src/libxrpl/ledger/Ledger.cpp @@ -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; diff --git a/src/test/app/FeeVote_test.cpp b/src/test/app/FeeVote_test.cpp index f4fe5801b6..ac149156ae 100644 --- a/src/test/app/FeeVote_test.cpp +++ b/src/test/app/FeeVote_test.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include namespace xrpl::test { diff --git a/src/xrpld/app/misc/FeeVoteImpl.cpp b/src/xrpld/app/misc/FeeVoteImpl.cpp index 70a25a155a..24ba7fdaaa 100644 --- a/src/xrpld/app/misc/FeeVoteImpl.cpp +++ b/src/xrpld/app/misc/FeeVoteImpl.cpp @@ -32,23 +32,23 @@ namespace xrpl { namespace detail { -template +template class VotableValue { private: - value_type const current_; // The current setting - value_type const target_; // The setting we want - std::map voteMap_; + ValueType const current_; // The current setting + ValueType const target_; // The setting we want + std::map 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 + [[nodiscard]] std::pair getVotes() const; }; -template -std::pair -VotableValue::getVotes() const +template +std::pair +VotableValue::getVotes() const { - value_type ourVote = current_; + ValueType ourVote = current_; int weight = 0; for (auto const& [key, val] : voteMap_) {