Clang-tidy changes

This commit is contained in:
Bart
2026-06-07 17:09:18 -04:00
parent 2f65e0ae23
commit b3ef351fed
7 changed files with 12 additions and 12 deletions

View File

@@ -13,6 +13,7 @@
#include <cstdint>
#include <cstring>
#include <string>
#include <string_view>
#include <vector>
namespace xrpl {

View File

@@ -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>

View File

@@ -33,6 +33,7 @@
#include <ostream>
#include <stdexcept>
#include <string>
#include <string_view>
#include <thread>
#include <utility>
#include <vector>

View File

@@ -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();

View File

@@ -32,6 +32,7 @@
#include <mutex>
#include <sstream>
#include <string>
#include <string_view>
#include <utility>
#include <vector>

View File

@@ -19,6 +19,7 @@
#include <mutex>
#include <optional>
#include <string>
#include <utility>
namespace xrpl {

View File

@@ -25,6 +25,7 @@
#include <mutex>
#include <optional>
#include <string>
#include <string_view>
#include <utility>
#include <vector>