mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-20 10:35:50 +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);
|
prevStep_, offer, strandDst_, trOut);
|
||||||
|
|
||||||
auto ofrAmt = offer.amount ();
|
auto ofrAmt = offer.amount ();
|
||||||
auto stpAmt = make_Amounts (
|
TAmounts stpAmt{
|
||||||
mulRatio (ofrAmt.in, ofrInRate, QUALITY_ONE, /*roundUp*/ true),
|
mulRatio (ofrAmt.in, ofrInRate, QUALITY_ONE, /*roundUp*/ true),
|
||||||
ofrAmt.out);
|
ofrAmt.out};
|
||||||
|
|
||||||
// owner pays the transfer fee.
|
// owner pays the transfer fee.
|
||||||
auto ownerGives =
|
auto ownerGives =
|
||||||
|
|||||||
@@ -81,12 +81,6 @@ struct TAmounts
|
|||||||
Out out;
|
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>;
|
using Amounts = TAmounts<STAmount, STAmount>;
|
||||||
|
|
||||||
template<class In, class Out>
|
template<class In, class Out>
|
||||||
|
|||||||
Reference in New Issue
Block a user