Use MakeUnique<T>(...) instead of std::unique_ptr<T>(new T(...))

This commit is contained in:
practicalswift committed 2017-11-09 16:53:34 +01:00
1 parent 86179897e2
commit 3e09b390b4
6 files changed
+10 -10

No files matched your search

+1 -1
View File
@@ -17,7 +17,7 @@ WalletTestingSetup::WalletTestingSetup(const std::string& chainName):
bool fFirstRun;
std::unique_ptr<CWalletDBWrapper> dbw(new CWalletDBWrapper(&bitdb, "wallet_test.dat"));
pwalletMain = std::unique_ptr<CWallet>(new CWallet(std::move(dbw)));
pwalletMain = MakeUnique<CWallet>(std::move(dbw));
pwalletMain->LoadWallet(fFirstRun);
RegisterValidationInterface(pwalletMain.get());