mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-16 07:33:20 +01:00
scripted-diff: remove MakeUnique<T>()
-BEGIN VERIFY SCRIPT- git rm src/util/memory.h sed -i -e 's/MakeUnique/std::make_unique/g' $(git grep -l MakeUnique src) sed -i -e '/#include <util\/memory.h>/d' $(git grep -l '#include <util/memory.h>' src) sed -i -e '/util\/memory.h \\/d' src/Makefile.am -END VERIFY SCRIPT-
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
|
||||
#include <tinyformat.h>
|
||||
#include <util/system.h>
|
||||
#include <util/memory.h>
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
@@ -44,13 +43,13 @@ const CBaseChainParams& BaseParams()
|
||||
std::unique_ptr<CBaseChainParams> CreateBaseChainParams(const std::string& chain)
|
||||
{
|
||||
if (chain == CBaseChainParams::MAIN) {
|
||||
return MakeUnique<CBaseChainParams>("", 8332, 8334);
|
||||
return std::make_unique<CBaseChainParams>("", 8332, 8334);
|
||||
} else if (chain == CBaseChainParams::TESTNET) {
|
||||
return MakeUnique<CBaseChainParams>("testnet3", 18332, 18334);
|
||||
return std::make_unique<CBaseChainParams>("testnet3", 18332, 18334);
|
||||
} else if (chain == CBaseChainParams::SIGNET) {
|
||||
return MakeUnique<CBaseChainParams>("signet", 38332, 38334);
|
||||
return std::make_unique<CBaseChainParams>("signet", 38332, 38334);
|
||||
} else if (chain == CBaseChainParams::REGTEST) {
|
||||
return MakeUnique<CBaseChainParams>("regtest", 18443, 18445);
|
||||
return std::make_unique<CBaseChainParams>("regtest", 18443, 18445);
|
||||
}
|
||||
throw std::runtime_error(strprintf("%s: Unknown chain %s.", __func__, chain));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user