mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-19 01:55:48 +00:00
remove make_Amounts:
* c++-17's class template type deduction can replace this function
This commit is contained in:
@@ -583,9 +583,9 @@ BookStep<TIn, TOut, TDerived>::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 =
|
||||
|
||||
@@ -81,12 +81,6 @@ struct TAmounts
|
||||
Out out;
|
||||
};
|
||||
|
||||
template<class In, class Out>
|
||||
TAmounts<In, Out> make_Amounts(In const& in, Out const& out)
|
||||
{
|
||||
return TAmounts<In, Out>(in, out);
|
||||
}
|
||||
|
||||
using Amounts = TAmounts<STAmount, STAmount>;
|
||||
|
||||
template<class In, class Out>
|
||||
|
||||
Reference in New Issue
Block a user