mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-24 07:30:30 +00:00
chore: Enable most cppcoreguidelines checks (#7660)
This commit is contained in:
@@ -66,9 +66,9 @@ getTxFormat(TxType type)
|
||||
return format;
|
||||
}
|
||||
|
||||
STTx::STTx(STObject&& object) : STObject(std::move(object))
|
||||
STTx::STTx(STObject&& object)
|
||||
: STObject(std::move(object)), txType_(safeCast<TxType>(getFieldU16(sfTransactionType)))
|
||||
{
|
||||
txType_ = safeCast<TxType>(getFieldU16(sfTransactionType));
|
||||
applyTemplate(getTxFormat(txType_)->getSOTemplate()); // may throw
|
||||
tid_ = getHash(HashPrefix::TransactionId);
|
||||
buildBatchTxnIds();
|
||||
@@ -100,6 +100,9 @@ STTx::STTx(TxType type, std::function<void(STObject&)> assembler) : STObject(sfT
|
||||
|
||||
assembler(*this);
|
||||
|
||||
// txType_ must be read after the object is assembled, so this cannot be a
|
||||
// member initializer.
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-prefer-member-initializer)
|
||||
txType_ = safeCast<TxType>(getFieldU16(sfTransactionType));
|
||||
|
||||
if (txType_ != type)
|
||||
|
||||
Reference in New Issue
Block a user