mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-08 03:07:13 +00:00
Clang-tidy changes
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
namespace xrpl {
|
||||
|
||||
@@ -43,7 +43,7 @@ void
|
||||
CanonicalTXSet::insert(std::shared_ptr<STTx const> txn)
|
||||
{
|
||||
Key key(accountKey(txn->getAccountID(sfAccount)), txn->getSeqProxy(), txn->getTransactionID());
|
||||
map_.insert(std::make_pair(std::move(key), std::move(txn)));
|
||||
map_.insert(std::make_pair(key, std::move(txn)));
|
||||
}
|
||||
|
||||
std::shared_ptr<STTx const>
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <ostream>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <thread>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
@@ -5,23 +5,18 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
namespace xrpl {
|
||||
|
||||
AcceptedLedger::AcceptedLedger(std::shared_ptr<ReadView const> ledger) : ledger_(std::move(ledger))
|
||||
{
|
||||
transactions_.reserve(256);
|
||||
|
||||
auto insertAll = [&](auto const& txns) {
|
||||
for (auto const& item : txns)
|
||||
{
|
||||
transactions_.emplace_back(
|
||||
std::make_unique<AcceptedLedgerTx>(ledger_, item.first, item.second));
|
||||
}
|
||||
};
|
||||
|
||||
transactions_.reserve(256);
|
||||
insertAll(ledger_->txs);
|
||||
for (auto const& item : ledger_->txs)
|
||||
{
|
||||
transactions_.emplace_back(
|
||||
std::make_unique<AcceptedLedgerTx>(ledger_, item.first, item.second));
|
||||
}
|
||||
|
||||
std::ranges::sort(transactions_, [](auto const& a, auto const& b) {
|
||||
return a->getTxnSeq() < b->getTxnSeq();
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <mutex>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <mutex>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
namespace xrpl {
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <mutex>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user