diff options
| author | Murch <[email protected]> | 2015-12-07 18:35:29 +0100 |
|---|---|---|
| committer | Murch <[email protected]> | 2016-01-05 22:03:43 +0100 |
| commit | 96efcadfc0d8a84066982533c676072d3b5d8314 (patch) | |
| tree | 3c639f001f1682d0e210e7784fe2fe0b6c45f51e | |
| parent | Merge pull request #6589 (diff) | |
| download | discoin-96efcadfc0d8a84066982533c676072d3b5d8314.tar.xz discoin-96efcadfc0d8a84066982533c676072d3b5d8314.zip | |
Improved readability of sorting for coin selection.
Future proofing added lines
| -rw-r--r-- | src/wallet/wallet.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index d23d54e67..0e1425640 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1701,7 +1701,8 @@ bool CWallet::SelectCoinsMinConf(const CAmount& nTargetValue, int nConfMine, int } // 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<char> vfBest; CAmount nBest; |