chore: Enable most cppcoreguidelines checks (#7660)

This commit is contained in:
Ayaz Salikhov
2026-07-07 14:12:52 +01:00
committed by GitHub
parent f5e63f8a91
commit c5a6de6ef7
29 changed files with 86 additions and 74 deletions

View File

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