chore: Apply clang-format width 100 (#6387)

This commit is contained in:
Ayaz Salikhov
2026-02-19 23:30:00 +00:00
parent 25cca46553
commit 2c1fad1023
786 changed files with 26105 additions and 12252 deletions

View File

@@ -34,20 +34,23 @@ STLedgerEntry::STLedgerEntry(Keylet const& k) : STObject(sfLedgerEntry), key_(k.
if (format == nullptr)
Throw<std::runtime_error>(
"Attempt to create a SLE of unknown type " + std::to_string(safe_cast<std::uint16_t>(k.type)));
"Attempt to create a SLE of unknown type " +
std::to_string(safe_cast<std::uint16_t>(k.type)));
set(format->getSOTemplate());
setFieldU16(sfLedgerEntryType, static_cast<std::uint16_t>(type_));
}
STLedgerEntry::STLedgerEntry(SerialIter& sit, uint256 const& index) : STObject(sfLedgerEntry), key_(index)
STLedgerEntry::STLedgerEntry(SerialIter& sit, uint256 const& index)
: STObject(sfLedgerEntry), key_(index)
{
set(sit);
setSLEType();
}
STLedgerEntry::STLedgerEntry(STObject const& object, uint256 const& index) : STObject(object), key_(index)
STLedgerEntry::STLedgerEntry(STObject const& object, uint256 const& index)
: STObject(object), key_(index)
{
setSLEType();
}
@@ -55,7 +58,8 @@ STLedgerEntry::STLedgerEntry(STObject const& object, uint256 const& index) : STO
void
STLedgerEntry::setSLEType()
{
auto format = LedgerFormats::getInstance().findByType(safe_cast<LedgerEntryType>(getFieldU16(sfLedgerEntryType)));
auto format = LedgerFormats::getInstance().findByType(
safe_cast<LedgerEntryType>(getFieldU16(sfLedgerEntryType)));
if (format == nullptr)
Throw<std::runtime_error>("invalid ledger entry type");
@@ -114,7 +118,8 @@ STLedgerEntry::getJson(JsonOptions options) const
ret[jss::index] = to_string(key_);
if (getType() == ltMPTOKEN_ISSUANCE)
ret[jss::mpt_issuance_id] = to_string(makeMptID(getFieldU32(sfSequence), getAccountID(sfIssuer)));
ret[jss::mpt_issuance_id] =
to_string(makeMptID(getFieldU32(sfSequence), getAccountID(sfIssuer)));
return ret;
}
@@ -132,7 +137,11 @@ STLedgerEntry::isThreadedType(Rules const& rules) const
}
bool
STLedgerEntry::thread(uint256 const& txID, std::uint32_t ledgerSeq, uint256& prevTxID, std::uint32_t& prevLedgerID)
STLedgerEntry::thread(
uint256 const& txID,
std::uint32_t ledgerSeq,
uint256& prevTxID,
std::uint32_t& prevLedgerID)
{
uint256 oldPrevTxID = getFieldH256(sfPreviousTxnID);
@@ -142,7 +151,8 @@ STLedgerEntry::thread(uint256 const& txID, std::uint32_t ledgerSeq, uint256& pre
{
// this transaction is already threaded
XRPL_ASSERT(
getFieldU32(sfPreviousTxnLgrSeq) == ledgerSeq, "xrpl::STLedgerEntry::thread : ledger sequence match");
getFieldU32(sfPreviousTxnLgrSeq) == ledgerSeq,
"xrpl::STLedgerEntry::thread : ledger sequence match");
return false;
}