mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Convert rvalue to an lvalue. (RIPD-494)
* The rvalue gets destructed as soon as "rc" is constructed.
This commit is contained in:
committed by
Tom Ritchford
parent
8dd799aa6f
commit
2b69ded1ea
@@ -270,13 +270,15 @@ STPathSet Pathfinder::filterPaths(int iMaxPaths, STPath& extraPath)
|
||||
try
|
||||
{
|
||||
LedgerEntrySet lesSandbox (mLedger, tapNONE);
|
||||
// Need a lvalue here. An rvalue will be destructed as soon as the RippleCalc ctor ends.
|
||||
STPathSet spsPaths;
|
||||
path::RippleCalc rc(
|
||||
lesSandbox,
|
||||
mSrcAmount,
|
||||
mDstAmount,
|
||||
mDstAccountID,
|
||||
mSrcAccountID,
|
||||
STPathSet ());
|
||||
spsPaths);
|
||||
rc.partialPaymentAllowed_ = true;
|
||||
|
||||
TER result = rc.rippleCalculate ();
|
||||
|
||||
Reference in New Issue
Block a user