chore: Set ColumnLimit to 120 in clang-format (#6288)

This change updates the ColumnLimit from 80 to 120, and applies clang-format to reformat the code.
This commit is contained in:
Ayaz Salikhov
2026-01-28 18:09:50 +00:00
committed by GitHub
parent 92046785d1
commit 5f638f5553
1016 changed files with 26918 additions and 66660 deletions

View File

@@ -28,30 +28,26 @@
namespace xrpl {
STLedgerEntry::STLedgerEntry(Keylet const& k)
: STObject(sfLedgerEntry), key_(k.key), type_(k.type)
STLedgerEntry::STLedgerEntry(Keylet const& k) : STObject(sfLedgerEntry), key_(k.key), type_(k.type)
{
auto const format = LedgerFormats::getInstance().findByType(type_);
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();
}
@@ -59,8 +55,7 @@ STLedgerEntry::STLedgerEntry(STObject const& object, uint256 const& index)
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");
@@ -108,8 +103,7 @@ STLedgerEntry::getSType() const
std::string
STLedgerEntry::getText() const
{
return str(
boost::format("{ %s, %s }") % to_string(key_) % STObject::getText());
return str(boost::format("{ %s, %s }") % to_string(key_) % STObject::getText());
}
Json::Value
@@ -120,8 +114,7 @@ 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;
}
@@ -134,19 +127,12 @@ STLedgerEntry::isThreadedType(Rules const& rules) const
// Exclude PrevTxnID/PrevTxnLgrSeq if the fixPreviousTxnID amendment is not
// enabled and the ledger object type is in the above set
bool const excludePrevTxnID = !rules.enabled(fixPreviousTxnID) &&
std::count(
newPreviousTxnIDTypes.cbegin(),
newPreviousTxnIDTypes.cend(),
type_);
std::count(newPreviousTxnIDTypes.cbegin(), newPreviousTxnIDTypes.cend(), type_);
return !excludePrevTxnID && getFieldIndex(sfPreviousTxnID) != -1;
}
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);
@@ -156,8 +142,7 @@ STLedgerEntry::thread(
{
// 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;
}