From 2834d460265d81900bce376dcb2608f0612f6db3 Mon Sep 17 00:00:00 2001 From: Gregory Tsipenyuk Date: Thu, 19 Oct 2023 18:25:50 -0400 Subject: [PATCH] [FOLD] Change OfferCrossing enumerators to a lower case letter --- src/ripple/app/paths/RippleCalc.cpp | 2 +- src/ripple/app/paths/impl/Steps.h | 2 +- src/ripple/app/paths/impl/StrandFlow.h | 4 ++-- src/ripple/app/tx/impl/CashCheck.cpp | 2 +- src/ripple/app/tx/impl/CreateOffer.cpp | 4 ++-- src/test/app/AMMExtended_test.cpp | 2 +- src/test/app/Flow_test.cpp | 2 +- src/test/app/PayStrand_test.cpp | 16 ++++++++-------- src/test/app/TheoreticalQuality_test.cpp | 2 +- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/ripple/app/paths/RippleCalc.cpp b/src/ripple/app/paths/RippleCalc.cpp index 99c2dd1114f..87ef694fa58 100644 --- a/src/ripple/app/paths/RippleCalc.cpp +++ b/src/ripple/app/paths/RippleCalc.cpp @@ -106,7 +106,7 @@ RippleCalc::rippleCalculate( defaultPaths, partialPayment, ownerPaysTransferFee, - OfferCrossing::No, + OfferCrossing::no, limitQuality, sendMax, j, diff --git a/src/ripple/app/paths/impl/Steps.h b/src/ripple/app/paths/impl/Steps.h index 6a18bcda63e..1ae2273929d 100644 --- a/src/ripple/app/paths/impl/Steps.h +++ b/src/ripple/app/paths/impl/Steps.h @@ -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) diff --git a/src/ripple/app/paths/impl/StrandFlow.h b/src/ripple/app/paths/impl/StrandFlow.h index 4a0dc00478f..7817251560f 100644 --- a/src/ripple/app/paths/impl/StrandFlow.h +++ b/src/ripple/app/paths/impl/StrandFlow.h @@ -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, @@ -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 diff --git a/src/ripple/app/tx/impl/CashCheck.cpp b/src/ripple/app/tx/impl/CashCheck.cpp index 64cb2735713..bc3d838540b 100644 --- a/src/ripple/app/tx/impl/CashCheck.cpp +++ b/src/ripple/app/tx/impl/CashCheck.cpp @@ -447,7 +447,7 @@ CashCheck::doApply() true, // default path static_cast(optDeliverMin), // partial payment true, // owner pays transfer fee - OfferCrossing::No, + OfferCrossing::no, std::nullopt, sleCheck->getFieldAmount(sfSendMax), viewJ); diff --git a/src/ripple/app/tx/impl/CreateOffer.cpp b/src/ripple/app/tx/impl/CreateOffer.cpp index a6f090a3f51..17f7e2853db 100644 --- a/src/ripple/app/tx/impl/CreateOffer.cpp +++ b/src/ripple/app/tx/impl/CreateOffer.cpp @@ -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. diff --git a/src/test/app/AMMExtended_test.cpp b/src/test/app/AMMExtended_test.cpp index 5dda2e55779..8c7cbce92f4 100644 --- a/src/test/app/AMMExtended_test.cpp +++ b/src/test/app/AMMExtended_test.cpp @@ -2103,7 +2103,7 @@ struct AMMExtended_test : public jtx::AMMTest false, false, true, - OfferCrossing::No, + OfferCrossing::no, std::nullopt, smax, flowJournal); diff --git a/src/test/app/Flow_test.cpp b/src/test/app/Flow_test.cpp index 82b8a89702d..920f7a6e058 100644 --- a/src/test/app/Flow_test.cpp +++ b/src/test/app/Flow_test.cpp @@ -473,7 +473,7 @@ struct Flow_test : public beast::unit_test::suite false, false, true, - OfferCrossing::No, + OfferCrossing::no, std::nullopt, smax, flowJournal); diff --git a/src/test/app/PayStrand_test.cpp b/src/test/app/PayStrand_test.cpp index e934f2b92b3..55c15e54fc0 100644 --- a/src/test/app/PayStrand_test.cpp +++ b/src/test/app/PayStrand_test.cpp @@ -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); @@ -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)_; @@ -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)_; @@ -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); @@ -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); @@ -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); @@ -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); @@ -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); diff --git a/src/test/app/TheoreticalQuality_test.cpp b/src/test/app/TheoreticalQuality_test.cpp index 5b7f7c6b9e7..b76ea723542 100644 --- a/src/test/app/TheoreticalQuality_test.cpp +++ b/src/test/app/TheoreticalQuality_test.cpp @@ -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);