mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Use MakeUnique<T>(...) instead of std::unique_ptr<T>(new T(...))
This commit is contained in:
@@ -3806,7 +3806,7 @@ CWallet* CWallet::CreateWalletFromFile(const std::string walletFile)
|
||||
uiInterface.InitMessage(_("Zapping all transactions from wallet..."));
|
||||
|
||||
std::unique_ptr<CWalletDBWrapper> dbw(new CWalletDBWrapper(&bitdb, walletFile));
|
||||
std::unique_ptr<CWallet> tempWallet(new CWallet(std::move(dbw)));
|
||||
std::unique_ptr<CWallet> tempWallet = MakeUnique<CWallet>(std::move(dbw));
|
||||
DBErrors nZapWalletRet = tempWallet->ZapWalletTx(vWtx);
|
||||
if (nZapWalletRet != DB_LOAD_OK) {
|
||||
InitError(strprintf(_("Error loading %s: Wallet corrupted"), walletFile));
|
||||
|
||||
Reference in New Issue
Block a user