chore: clang-format

This commit is contained in:
Nicholas Dudfield
2026-02-20 06:06:15 +09:00
committed by tequ
parent 52369f3ebb
commit fff46e3dd0
2 changed files with 14 additions and 8 deletions

View File

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

View File

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