From 70c2e1b4192aeb64931dd4f12b264c67f117240d Mon Sep 17 00:00:00 2001 From: seelabs Date: Wed, 7 Aug 2019 13:01:04 -0700 Subject: [PATCH] remove make_Amounts: * c++-17's class template type deduction can replace this function --- src/ripple/app/paths/impl/BookStep.cpp | 4 ++-- src/ripple/protocol/Quality.h | 6 ------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/ripple/app/paths/impl/BookStep.cpp b/src/ripple/app/paths/impl/BookStep.cpp index 433373b73..fa692ac95 100644 --- a/src/ripple/app/paths/impl/BookStep.cpp +++ b/src/ripple/app/paths/impl/BookStep.cpp @@ -583,9 +583,9 @@ BookStep::forEachOffer ( prevStep_, offer, strandDst_, trOut); auto ofrAmt = offer.amount (); - auto stpAmt = make_Amounts ( + TAmounts stpAmt{ mulRatio (ofrAmt.in, ofrInRate, QUALITY_ONE, /*roundUp*/ true), - ofrAmt.out); + ofrAmt.out}; // owner pays the transfer fee. auto ownerGives = diff --git a/src/ripple/protocol/Quality.h b/src/ripple/protocol/Quality.h index e8016e0c3..3443640ac 100644 --- a/src/ripple/protocol/Quality.h +++ b/src/ripple/protocol/Quality.h @@ -81,12 +81,6 @@ struct TAmounts Out out; }; -template -TAmounts make_Amounts(In const& in, Out const& out) -{ - return TAmounts(in, out); -} - using Amounts = TAmounts; template