diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 748efbf6ad..9c613ff9fd 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -5232,8 +5232,8 @@ bool AutoBackupWallet(CWallet* wallet, const std::string& strWalletFile_, std::s // Loop backward through backup files and keep the N newest ones (1 <= N <= 10) int counter = 0; - BOOST_REVERSE_FOREACH(std::pair file, folder_set) - { + for(auto it = folder_set.rbegin(); it != folder_set.rend(); ++it) { + std::pair file = *it; counter++; if (counter > nWalletBackups) {