From: CryptoManiac Date: Sat, 27 Nov 2021 11:01:39 +0000 (+0300) Subject: random_shuffle has been removed in c++17 X-Git-Tag: nvc-v0.5.9~135 X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=8505dbffa6e9007b04626eed609cc419423ed202 random_shuffle has been removed in c++17 --- diff --git a/src/wallet.cpp b/src/wallet.cpp index 2455b27..c02b6bb 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -13,7 +13,7 @@ #include "coincontrol.h" #include #include - +#include #include "main.h" using namespace std; @@ -1829,7 +1829,9 @@ bool CWallet::SelectCoinsMinConf(int64_t nTargetValue, unsigned int nSpendTime, vector > > vValue; int64_t nTotalLower = 0; - random_shuffle(vCoins.begin(), vCoins.end(), GetRandInt); + std::random_device rd; + std::mt19937 g(rd()); + shuffle(vCoins.begin(), vCoins.end(), g); BOOST_FOREACH(const COutput &output, vCoins) {