From: Murch Date: Fri, 29 Nov 2019 13:15:28 +0000 (+0200) Subject: Improved readability of sorting for coin selection. X-Git-Tag: nvc-v0.5.9~141^2~9 X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=95df147bd16a1b3052f1a62f18a3ef880b0ad0ab Improved readability of sorting for coin selection. --- diff --git a/src/wallet.cpp b/src/wallet.cpp index 9140710..2455b27 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -1888,7 +1888,8 @@ bool CWallet::SelectCoinsMinConf(int64_t nTargetValue, unsigned int nSpendTime, } // Solve subset sum by stochastic approximation - sort(vValue.rbegin(), vValue.rend(), CompareValueOnly()); + std::sort(vValue.begin(), vValue.end(), CompareValueOnly()); + std::reverse(vValue.begin(), vValue.end()); vector vfBest; int64_t nBest;