Files
rippled/include/xrpl
Mayukha Vadari a1a86bd362 refactor: Add std::optional overload for isZeroId
Addresses bthomee's review suggestion: about a third of isZeroId call
sites are the optional-field pattern 'x && isZeroId(*x)'. Add an
overload taking std::optional<T> const& and collapse the 5 direct
call sites (Payment, LoanSet, LoanBrokerCoverClawback, OfferCreate,
PermissionedDomainSet). The remaining if-let uses are left alone
because collapsing them would move unrelated code out of the outer
block.

The negated helpers (!isPositiveAmount etc.) are intentionally not
overloaded: with an optional overload, !isPositiveAmount(opt) would
be true when the optional is empty, which is the opposite of the
existing 'opt && !isPositiveAmount(*opt)' semantics.
2026-09-23 01:58:38 +05:30
..