Skip to content

Commit

Permalink
Fix clang format
Browse files Browse the repository at this point in the history
  • Loading branch information
gregtatcam committed Mar 3, 2024
1 parent c968988 commit c198404
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/ripple/app/tx/impl/OfferStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,10 @@ accountFundsHelper(
return accountFunds(view, id, saDefault, freezeHandling, j);
}

// clang-format-off
// clang-format off
template <typename T>
requires(std::is_same_v<T, IOUAmount> || std::is_same_v<T, MPTAmount>)
// clang-format on
static T
accountFundsHelper(
ReadView const& view,
Expand All @@ -122,7 +123,6 @@ accountFundsHelper(

return toAmount<T>(accountHolds(view, id, asset, freezeHandling, j));
}
//clang-format-on

static XRPAmount
accountFundsHelper(
Expand All @@ -137,9 +137,11 @@ accountFundsHelper(
accountHolds(view, id, asset, freezeHandling, j));
}

// clang-format off
template <class TIn, class TOut>
template <class TTakerPays, class TTakerGets>
requires ValidTaker<TTakerPays, TTakerGets>
// clang-format on
bool
TOfferStreamBase<TIn, TOut>::shouldRmSmallIncreasedQOffer() const
{
Expand Down
3 changes: 1 addition & 2 deletions src/ripple/app/tx/impl/OfferStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ class TOfferStreamBase
permRmOffer(uint256 const& offerIndex) = 0;

template <class TTakerPays, class TTakerGets>
requires ValidTaker<TTakerPays, TTakerGets>
bool
requires ValidTaker<TTakerPays, TTakerGets> bool
shouldRmSmallIncreasedQOffer() const;

public:
Expand Down
4 changes: 2 additions & 2 deletions src/test/jtx/impl/AMM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ static IOUAmount
initialTokens(STAmount const& asset1, STAmount const& asset2)
{
auto const product = number(asset1) * number(asset2);
return (
IOUAmount)(product.mantissa() >= 0 ? root2(product) : root2(-product));
return (IOUAmount)(
product.mantissa() >= 0 ? root2(product) : root2(-product));
}

AMM::AMM(
Expand Down

0 comments on commit c198404

Please sign in to comment.