From 7b9a98692d829b462c45aaa680707df5d957633b Mon Sep 17 00:00:00 2001 From: Mayukha Vadari Date: Wed, 6 May 2026 11:36:45 -0400 Subject: [PATCH] fix clang-tidy issues --- include/xrpl/protocol/STObject.h | 2 +- include/xrpl/protocol_autogen/LedgerEntryBuilderBase.h | 2 +- include/xrpl/protocol_autogen/TransactionBuilderBase.h | 2 +- src/libxrpl/protocol/STTakesAsset.cpp | 2 +- src/libxrpl/tx/transactors/token/MPTokenIssuanceSet.cpp | 4 ++-- src/test/app/Loan_test.cpp | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/xrpl/protocol/STObject.h b/include/xrpl/protocol/STObject.h index a9e46e8717..95e3176964 100644 --- a/include/xrpl/protocol/STObject.h +++ b/include/xrpl/protocol/STObject.h @@ -587,7 +587,7 @@ public: /** Returns `true` if the field is set. - Fields with soeDEFAULT and set to the + Fields with SoeDefault and set to the default value will return `true` */ explicit diff --git a/include/xrpl/protocol_autogen/LedgerEntryBuilderBase.h b/include/xrpl/protocol_autogen/LedgerEntryBuilderBase.h index e2f05c31ab..5d4753f792 100644 --- a/include/xrpl/protocol_autogen/LedgerEntryBuilderBase.h +++ b/include/xrpl/protocol_autogen/LedgerEntryBuilderBase.h @@ -27,7 +27,7 @@ public: SF_UINT32::type::value_type flags = 0) { // Don't call object_.set(soTemplate) - keep object_ as a free object. - // This avoids creating STBase placeholders for soeDEFAULT fields, + // This avoids creating STBase placeholders for SoeDefault fields, // which would cause applyTemplate() to throw "may not be explicitly // set to default" when building the SLE. // The SLE constructor will call applyTemplate() which properly diff --git a/include/xrpl/protocol_autogen/TransactionBuilderBase.h b/include/xrpl/protocol_autogen/TransactionBuilderBase.h index 14975b152e..e9a5eb0cba 100644 --- a/include/xrpl/protocol_autogen/TransactionBuilderBase.h +++ b/include/xrpl/protocol_autogen/TransactionBuilderBase.h @@ -35,7 +35,7 @@ public: std::optional fee) { // Don't call object_.set(soTemplate) - keep object_ as a free object. - // This avoids creating STBase placeholders for soeDEFAULT fields, + // This avoids creating STBase placeholders for SoeDefault fields, // which would cause applyTemplate() to throw "may not be explicitly // set to default" when building the STTx. // The STTx constructor will call applyTemplate() which properly diff --git a/src/libxrpl/protocol/STTakesAsset.cpp b/src/libxrpl/protocol/STTakesAsset.cpp index de7de002b0..2a54ec1f37 100644 --- a/src/libxrpl/protocol/STTakesAsset.cpp +++ b/src/libxrpl/protocol/STTakesAsset.cpp @@ -39,7 +39,7 @@ associateAsset(SLE& sle, Asset const& asset) // associateAsset in derived classes may change the underlying // value, but it won't know anything about how the value relates to - // the SLE. If the template element is soeDEFAULT, and the value + // the SLE. If the template element is SoeDefault, and the value // changed to the default value, remove the field. if (style == SoeDefault && ta.isDefault()) sle.makeFieldAbsent(field); diff --git a/src/libxrpl/tx/transactors/token/MPTokenIssuanceSet.cpp b/src/libxrpl/tx/transactors/token/MPTokenIssuanceSet.cpp index 05089621c6..6fab29751c 100644 --- a/src/libxrpl/tx/transactors/token/MPTokenIssuanceSet.cpp +++ b/src/libxrpl/tx/transactors/token/MPTokenIssuanceSet.cpp @@ -226,7 +226,7 @@ MPTokenIssuanceSet::preclaim(PreclaimContext const& ctx) } } - // sfMutableFlags is soeDEFAULT, defaulting to 0 if not specified on + // sfMutableFlags is SoeDefault, defaulting to 0 if not specified on // the ledger. auto const currentMutableFlags = sleMptIssuance->getFieldU32(sfMutableFlags); @@ -329,7 +329,7 @@ MPTokenIssuanceSet::doApply() if (auto const transferFee = ctx_.tx[~sfTransferFee]) { - // TransferFee uses soeDEFAULT style: + // TransferFee uses SoeDefault style: // - If the field is absent, it is interpreted as 0. // - If the field is present, it must be non-zero. // Therefore, when TransferFee is 0, the field should be removed. diff --git a/src/test/app/Loan_test.cpp b/src/test/app/Loan_test.cpp index f189196a82..b4d3a2691f 100644 --- a/src/test/app/Loan_test.cpp +++ b/src/test/app/Loan_test.cpp @@ -3639,7 +3639,7 @@ protected: auto const loan = objects[0u]; BEAST_EXPECT(loan[sfBorrower] == lender.human()); - // soeDEFAULT fields are not returned if they're in the default + // SoeDefault fields are not returned if they're in the default // state BEAST_EXPECT(!loan.isMember(sfCloseInterestRate)); BEAST_EXPECT(!loan.isMember(sfClosePaymentFee));