Skip to content

Commit

Permalink
Fix clang format
Browse files Browse the repository at this point in the history
  • Loading branch information
gregtatcam committed Nov 21, 2023
1 parent 501024c commit d9ec24f
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 23 deletions.
3 changes: 1 addition & 2 deletions src/ripple/app/paths/impl/DirectStepCFT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,7 @@ class DirectCFTPaymentStep : public DirectStepCFT<DirectCFTPaymentStep>
using DirectStepCFT<DirectCFTPaymentStep>::DirectStepCFT;
using DirectStepCFT<DirectCFTPaymentStep>::check;

bool
verifyPrevStepDebtDirection(DebtDirection) const
bool verifyPrevStepDebtDirection(DebtDirection) const
{
// A payment doesn't care whether or not prevStepRedeems.
return true;
Expand Down
2 changes: 1 addition & 1 deletion src/ripple/app/tx/impl/OfferStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ accountFundsHelper(

template <class TIn, class TOut>
template <class TTakerPays, class TTakerGets>
requires ValidTaker<TTakerPays, TTakerGets> bool
requires ValidTaker<TTakerPays, TTakerGets> bool
TOfferStreamBase<TIn, TOut>::shouldRmSmallIncreasedQOffer() const
{
if (!view_.rules().enabled(fixRmSmallIncreasedQOffers))
Expand Down
4 changes: 2 additions & 2 deletions src/ripple/protocol/Asset.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,15 @@ class Asset
}

template <typename T>
requires(std::is_same_v<T, Currency> || std::is_same_v<T, uint256>)
requires(std::is_same_v<T, Currency> || std::is_same_v<T, uint256>)
T const* get() const
{
checkInit();
return std::get_if<T>(asset_);
}

template <typename T>
requires(std::is_same_v<T, Currency> || std::is_same_v<T, uint256>)
requires(std::is_same_v<T, Currency> || std::is_same_v<T, uint256>)
explicit operator T const&() const
{
checkInit();
Expand Down
3 changes: 1 addition & 2 deletions src/ripple/protocol/STAmount.h
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,7 @@ inline STAmount::operator Number() const
return iou();
}

inline STAmount&
STAmount::operator=(beast::Zero)
inline STAmount& STAmount::operator=(beast::Zero)
{
clear();
return *this;
Expand Down
3 changes: 1 addition & 2 deletions src/ripple/protocol/impl/STAmount.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -715,8 +715,7 @@ STAmount::getText() const
return ret;
}

Json::Value
STAmount::getJson(JsonOptions) const
Json::Value STAmount::getJson(JsonOptions) const
{
Json::Value elem;
setJson(elem);
Expand Down
3 changes: 1 addition & 2 deletions src/ripple/protocol/impl/STPathSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,7 @@ STPath::hasSeen(
return false;
}

Json::Value
STPath::getJson(JsonOptions) const
Json::Value STPath::getJson(JsonOptions) const
{
Json::Value ret(Json::arrayValue);

Expand Down
11 changes: 4 additions & 7 deletions src/test/jtx/amount.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ struct PrettyAmount
return amount_;
}

operator STAmount const&() const
operator STAmount const &() const
{
return amount_;
}
Expand Down Expand Up @@ -211,8 +211,7 @@ struct XRP_t
/** @} */

/** Returns None-of-XRP */
None
operator()(none_t) const
None operator()(none_t) const
{
return {xrpIssue()};
}
Expand Down Expand Up @@ -335,8 +334,7 @@ class IOU
// STAmount operator()(char const* s) const;

/** Returns None-of-Issue */
None
operator()(none_t) const
None operator()(none_t) const
{
return {issue()};
}
Expand Down Expand Up @@ -406,8 +404,7 @@ class CFT
// STAmount operator()(char const* s) const;

/** Returns None-of-Issue */
None
operator()(none_t) const
None operator()(none_t) const
{
return {issue()};
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/jtx/cft.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class CFTIssuance
}

template <class T>
requires(sizeof(T) >= sizeof(int) && std::is_arithmetic_v<T>)
requires(sizeof(T) >= sizeof(int) && std::is_arithmetic_v<T>)
PrettyAmount cft(T v) const
{
return {
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
3 changes: 1 addition & 2 deletions src/test/jtx/impl/amount.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ operator<<(std::ostream& os, PrettyAmount const& amount)

XRP_t const XRP{};

PrettyAmount
IOU::operator()(epsilon_t) const
PrettyAmount IOU::operator()(epsilon_t) const
{
return {STAmount(issue(), 1, -81), account.name()};
}
Expand Down

0 comments on commit d9ec24f

Please sign in to comment.