Skip to content

Commit

Permalink
Clang format fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gregtatcam committed Feb 7, 2024
1 parent 2d7b5da commit d1e7fe4
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 13 deletions.
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 @@ -149,7 +149,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
2 changes: 1 addition & 1 deletion src/ripple/app/tx/impl/OfferStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +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
2 changes: 1 addition & 1 deletion src/ripple/protocol/Asset.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class Asset
inline constexpr std::weak_ordering
operator<=>(Asset const& lhs, Asset const& rhs)
{
//assert(lhs.isCurrency() == rhs.isCurrency());
assert(lhs.isCurrency() == rhs.isCurrency());
if (lhs.isCurrency() != rhs.isCurrency())
Throw<std::logic_error>("Invalid Asset comparison");
if (lhs.isCurrency())
Expand Down
4 changes: 2 additions & 2 deletions src/ripple/protocol/impl/Asset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ Asset::addBitString(ripple::Serializer& s) const
}
}

Asset::operator Currency const&() const
Asset::operator Currency const &() const
{
assert(std::holds_alternative<Currency>(asset_));
if (!std::holds_alternative<Currency>(asset_))
Throw<std::logic_error>("Invalid Currency cast");
return std::get<Currency>(asset_);
}

Asset::operator MPT const&() const
Asset::operator MPT const &() const
{
// assert(std::holds_alternative<MPT>(asset_));
if (!std::holds_alternative<MPT>(asset_))
Expand Down
10 changes: 5 additions & 5 deletions src/ripple/protocol/impl/STIssue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ STIssue::STIssue(SerialIter& sit, SField const& name) : STBase{name}
if (isXRP(currency))
issue_ = std::make_pair(currency, account);
else if (auto const sequence = getSequence(currency);
sequence == getSequence(account) &&
memcmp(
currency.data() + seqSize,
account.data() + 2 * seqSize,
truncAcctSize - seqSize) == 0)
sequence == getSequence(account) &&
memcmp(
currency.data() + seqSize,
account.data() + 2 * seqSize,
truncAcctSize - seqSize) == 0)
{
AccountID account1;
memcpy(account1.data(), currency.data(), truncAcctSize);
Expand Down
7 changes: 4 additions & 3 deletions src/test/app/MPToken_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,8 @@ class MPToken_test : public beast::unit_test::suite

mptAlice.create();

env(check::create(env.master, alice, mptAlice.mpt(100)), ter(temINVALID));
env(check::create(env.master, alice, mptAlice.mpt(100)),
ter(temINVALID));
env.close();

BEAST_EXPECT(expectOffers(env, alice, 0));
Expand Down Expand Up @@ -1268,8 +1269,8 @@ class MPToken_test : public beast::unit_test::suite
env.close();

BEAST_EXPECT(env.balance(bob, YAN) == YAN(1'100));
BEAST_EXPECT(amm.expectBalances(
CRN(1'104), mpt3.mpt(1'000), amm.tokens()));
BEAST_EXPECT(
amm.expectBalances(CRN(1'104), mpt3.mpt(1'000), amm.tokens()));
BEAST_EXPECT(expectOffers(env, alice, 0));
}
}
Expand Down

0 comments on commit d1e7fe4

Please sign in to comment.