Skip to content

Commit

Permalink
[FOLD] Change OfferCrossing enumerators to a lower case letter
Browse files Browse the repository at this point in the history
  • Loading branch information
gregtatcam committed Oct 19, 2023
1 parent 3859760 commit 2834d46
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/ripple/app/paths/RippleCalc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ RippleCalc::rippleCalculate(
defaultPaths,
partialPayment,
ownerPaysTransferFee,
OfferCrossing::No,
OfferCrossing::no,
limitQuality,
sendMax,
j,
Expand Down
2 changes: 1 addition & 1 deletion src/ripple/app/paths/impl/Steps.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class AMMContext;
enum class DebtDirection { issues, redeems };
enum class QualityDirection { in, out };
enum class StrandDirection { forward, reverse };
enum OfferCrossing { No = 0, Yes = 1, Sell = 2 };
enum OfferCrossing { no = 0, yes = 1, sell = 2 };

inline bool
redeems(DebtDirection dir)
Expand Down
4 changes: 2 additions & 2 deletions src/ripple/app/paths/impl/StrandFlow.h
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ flow(
// That case is handled here if tfSell is also not set; i.e,
// case 1.
if (!offerCrossing ||
(fillOrKillEnabled && offerCrossing != OfferCrossing::Sell))
(fillOrKillEnabled && offerCrossing != OfferCrossing::sell))
return {
tecPATH_PARTIAL,
actualIn,
Expand All @@ -861,7 +861,7 @@ flow(
}
if (offerCrossing &&
(!partialPayment &&
(!fillOrKillEnabled || offerCrossing == OfferCrossing::Sell)))
(!fillOrKillEnabled || offerCrossing == OfferCrossing::sell)))
{
// If we're offer crossing and partialPayment is *not* true, then
// we're handling a FillOrKill offer. In this case remainingIn must
Expand Down
2 changes: 1 addition & 1 deletion src/ripple/app/tx/impl/CashCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ CashCheck::doApply()
true, // default path
static_cast<bool>(optDeliverMin), // partial payment
true, // owner pays transfer fee
OfferCrossing::No,
OfferCrossing::no,
std::nullopt,
sleCheck->getFieldAmount(sfSendMax),
viewJ);
Expand Down
4 changes: 2 additions & 2 deletions src/ripple/app/tx/impl/CreateOffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -736,10 +736,10 @@ CreateOffer::flowCross(
}
// Special handling for the tfSell flag.
STAmount deliver = takerAmount.out;
OfferCrossing offerCrossing = OfferCrossing::Yes;
OfferCrossing offerCrossing = OfferCrossing::yes;
if (txFlags & tfSell)
{
offerCrossing = OfferCrossing::Sell;
offerCrossing = OfferCrossing::sell;
// We are selling, so we will accept *more* than the offer
// specified. Since we don't know how much they might offer,
// we allow delivery of the largest possible amount.
Expand Down
2 changes: 1 addition & 1 deletion src/test/app/AMMExtended_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2103,7 +2103,7 @@ struct AMMExtended_test : public jtx::AMMTest
false,
false,
true,
OfferCrossing::No,
OfferCrossing::no,
std::nullopt,
smax,
flowJournal);
Expand Down
2 changes: 1 addition & 1 deletion src/test/app/Flow_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ struct Flow_test : public beast::unit_test::suite
false,
false,
true,
OfferCrossing::No,
OfferCrossing::no,
std::nullopt,
smax,
flowJournal);
Expand Down
16 changes: 8 additions & 8 deletions src/test/app/PayStrand_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ struct PayStrand_test : public beast::unit_test::suite
sendMaxIssue,
path,
true,
OfferCrossing::No,
OfferCrossing::no,
ammContext,
env.app().logs().journal("Flow"));
BEAST_EXPECT(ter == expTer);
Expand Down Expand Up @@ -684,7 +684,7 @@ struct PayStrand_test : public beast::unit_test::suite
/*sendMaxIssue*/ EUR.issue(),
path,
true,
OfferCrossing::No,
OfferCrossing::no,
ammContext,
env.app().logs().journal("Flow"));
(void)_;
Expand All @@ -701,7 +701,7 @@ struct PayStrand_test : public beast::unit_test::suite
/*sendMaxIssue*/ EUR.issue(),
path,
true,
OfferCrossing::No,
OfferCrossing::no,
ammContext,
env.app().logs().journal("Flow"));
(void)_;
Expand Down Expand Up @@ -821,7 +821,7 @@ struct PayStrand_test : public beast::unit_test::suite
USD.issue(),
STPath(),
true,
OfferCrossing::No,
OfferCrossing::no,
ammContext,
flowJournal);
BEAST_EXPECT(r.first == temBAD_PATH);
Expand All @@ -837,7 +837,7 @@ struct PayStrand_test : public beast::unit_test::suite
std::nullopt,
STPath(),
true,
OfferCrossing::No,
OfferCrossing::no,
ammContext,
flowJournal);
BEAST_EXPECT(r.first == temBAD_PATH);
Expand All @@ -853,7 +853,7 @@ struct PayStrand_test : public beast::unit_test::suite
std::nullopt,
STPath(),
true,
OfferCrossing::No,
OfferCrossing::no,
ammContext,
flowJournal);
BEAST_EXPECT(r.first == temBAD_PATH);
Expand Down Expand Up @@ -990,7 +990,7 @@ struct PayStrand_test : public beast::unit_test::suite
std::nullopt,
STPath(),
true,
OfferCrossing::No,
OfferCrossing::no,
ammContext,
env.app().logs().journal("Flow"));
BEAST_EXPECT(ter == tesSUCCESS);
Expand All @@ -1017,7 +1017,7 @@ struct PayStrand_test : public beast::unit_test::suite
USD.issue(),
path,
false,
OfferCrossing::No,
OfferCrossing::no,
ammContext,
env.app().logs().journal("Flow"));
BEAST_EXPECT(ter == tesSUCCESS);
Expand Down
2 changes: 1 addition & 1 deletion src/test/app/TheoreticalQuality_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ class TheoreticalQuality_test : public beast::unit_test::suite
rcp.paths,
/*defaultPaths*/ rcp.paths.empty(),
sb.rules().enabled(featureOwnerPaysFee),
OfferCrossing::No,
OfferCrossing::no,
ammContext,
dummyJ);

Expand Down

0 comments on commit 2834d46

Please sign in to comment.