From fff46e3dd0e8ede66015ae201ca75897513e08ae Mon Sep 17 00:00:00 2001 From: Nicholas Dudfield Date: Fri, 20 Feb 2026 06:06:15 +0900 Subject: [PATCH] chore: clang-format --- include/xrpl/protocol/detail/features.macro | 4 ++++ src/xrpld/app/tx/detail/SetHook.cpp | 18 ++++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/include/xrpl/protocol/detail/features.macro b/include/xrpl/protocol/detail/features.macro index 426303f20..3f48ac714 100644 --- a/include/xrpl/protocol/detail/features.macro +++ b/include/xrpl/protocol/detail/features.macro @@ -24,6 +24,8 @@ #error "undefined macro: XRPL_FIX" #endif +// clang-format off + // Add new amendments to the top of this list. // Keep it sorted in reverse chronological order. // If you add an amendment here, then do not forget to increment `numFeatures` @@ -144,3 +146,5 @@ XRPL_FIX (NFTokenNegOffer, Supported::yes, VoteBehavior::Obsolete) XRPL_FIX (NFTokenDirV1, Supported::yes, VoteBehavior::Obsolete) XRPL_FEATURE(NonFungibleTokensV1, Supported::yes, VoteBehavior::Obsolete) XRPL_FEATURE(CryptoConditionsSuite, Supported::yes, VoteBehavior::Obsolete) + +// clang-format on diff --git a/src/xrpld/app/tx/detail/SetHook.cpp b/src/xrpld/app/tx/detail/SetHook.cpp index 44f79ee5e..3e1a48a4e 100644 --- a/src/xrpld/app/tx/detail/SetHook.cpp +++ b/src/xrpld/app/tx/detail/SetHook.cpp @@ -1608,7 +1608,8 @@ SetHook::setHook() newHook.makeFieldAbsent(sfHookOnOutgoing); } else - newHook.setFieldH256(sfHookOnOutgoing, *newHookOnOutgoing); + newHook.setFieldH256( + sfHookOnOutgoing, *newHookOnOutgoing); } if (newHookOnIncoming) @@ -1620,7 +1621,8 @@ SetHook::setHook() newHook.makeFieldAbsent(sfHookOnIncoming); } else - newHook.setFieldH256(sfHookOnIncoming, *newHookOnIncoming); + newHook.setFieldH256( + sfHookOnIncoming, *newHookOnIncoming); } // set the hookcanemit field if it differs from definition @@ -1904,16 +1906,17 @@ SetHook::setHook() if (newDefSLE->isFieldPresent(sfHookOn)) defHookOn = newDefSLE->getFieldH256(sfHookOn); if (newDefSLE->isFieldPresent(sfHookOnIncoming)) - defHookOnIncoming = newDefSLE->getFieldH256(sfHookOnIncoming); + defHookOnIncoming = + newDefSLE->getFieldH256(sfHookOnIncoming); if (newDefSLE->isFieldPresent(sfHookOnOutgoing)) - defHookOnOutgoing = newDefSLE->getFieldH256(sfHookOnOutgoing); + defHookOnOutgoing = + newDefSLE->getFieldH256(sfHookOnOutgoing); // set the hookon field if it differs from definition if (newHookOn) { auto const diffFromDef = defHookOn != *newHookOn; - auto const hasIncOutgDef = - defHookOnIncoming.has_value() && + auto const hasIncOutgDef = defHookOnIncoming.has_value() && defHookOnOutgoing.has_value() && (*defHookOnIncoming != *defHookOnOutgoing || *newHookOn != *defHookOnIncoming); @@ -1930,8 +1933,7 @@ SetHook::setHook() auto const diffFromDef = defHookOnIncoming != newHookOnIncoming || defHookOnOutgoing != newHookOnOutgoing; - auto const hasHookOnDef = - defHookOn != newHookOnIncoming || + auto const hasHookOnDef = defHookOn != newHookOnIncoming || defHookOn != newHookOnOutgoing; if (diffFromDef || hasHookOnDef) {