Skip to content

Commit

Permalink
Fix clang format
Browse files Browse the repository at this point in the history
  • Loading branch information
gregtatcam committed Oct 12, 2023
1 parent cd81fae commit 32dac4b
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 29 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
3 changes: 1 addition & 2 deletions src/ripple/basics/CFTAmount.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ class CFTAmount : private boost::totally_ordered<CFTAmount>,
{
}

constexpr CFTAmount&
operator=(beast::Zero)
constexpr CFTAmount& operator=(beast::Zero)
{
cft_ = 0;
return *this;
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 @@ -448,8 +448,7 @@ inline STAmount::operator Number() const
}
}

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 @@ -761,8 +761,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/STCurrency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ STCurrency::getText() const
return to_string(currency_);
}

Json::Value
STCurrency::getJson(JsonOptions) const
Json::Value STCurrency::getJson(JsonOptions) const
{
Json::Value jv;
jv[jss::currency] = to_string(currency_);
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 @@ -163,8 +163,7 @@ STPath::hasSeen(
return false;
}

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

Expand Down
15 changes: 9 additions & 6 deletions src/test/app/CFToken_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class CFToken_test : public beast::unit_test::suite
env(trust(carol, USD(30'000)));
env(pay(gw, carol, USD(10'000)));
env(pay(alice, carol, USD(100)));
env(offer(alice, XRP(100), USD(100)));
}
{
// If the CFT amendment is not enabled, you should not be able to
Expand Down Expand Up @@ -154,8 +155,9 @@ class CFToken_test : public beast::unit_test::suite
// CFT Payment that doesn't cross
Env env{*this, features | featureCFTokensV1};
Account const gw("gw");
Account const rcv("rcv");
env.fund(XRP(10000), gw, rcv);
Account const alice("alice");
Account const carol("carol");
env.fund(XRP(10000), gw, alice);
env.close();

// TODO why not working with short codes?
Expand All @@ -170,13 +172,14 @@ class CFToken_test : public beast::unit_test::suite
amt["value"] = "1";
STAmount const yo = amountFromJson(sfAmount, amt);
auto const id = keylet::cftIssuance(gw.id(), to_currency("USD"));
env(cft::cftrust(rcv, ripple::to_string(id.key)));
env(cft::cftrust(alice, ripple::to_string(id.key)));
env.close();
BEAST_EXPECT(env.ownerCount(rcv) == 1);
env(pay(gw, rcv, yo));
BEAST_EXPECT(env.ownerCount(alice) == 1);
env(pay(gw, alice, yo));
env.close();
auto const sle = env.le(keylet::cftoken(rcv.id(), id.key));
auto const sle = env.le(keylet::cftoken(alice.id(), id.key));
BEAST_EXPECT(sle->getFieldU64(sfCFTAmount) == 1);
env(offer(alice, XRP(100), USD(100)));
}
}

Expand Down
13 changes: 7 additions & 6 deletions src/test/jtx/Env.h
Original file line number Diff line number Diff line change
Expand Up @@ -727,12 +727,13 @@ Env::rpc(std::string const& cmd, Args&&... args)
* an unsigned integer as its argument and returns void.
*/
template <class T>
concept SingleVersionedTestCallable =
requires(T callable, unsigned int version) {
{
callable(version)
} -> std::same_as<void>;
};
concept SingleVersionedTestCallable = requires(T callable, unsigned int version)
{
{
callable(version)
}
->std::same_as<void>;
};

/**
* The VersionedTestCallable concept checks if a set of callables all satisfy
Expand Down
8 changes: 3 additions & 5 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

0 comments on commit 32dac4b

Please sign in to comment.