diff options
author | fanquake <fanquake@gmail.com> | 2021-03-10 17:28:08 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2021-03-11 13:45:14 +0800 |
commit | 3ba2840e7ee81341b0748c0121aedc2e9305041a (patch) | |
tree | 1249a7df5095bc27d9af6cb214bb9f9530eb2fa4 /src/chainparamsbase.cpp | |
parent | 63314b8211d795b2bf0814e244d801e74f50b152 (diff) |
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-
Diffstat (limited to 'src/chainparamsbase.cpp')
-rw-r--r-- | src/chainparamsbase.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/chainparamsbase.cpp b/src/chainparamsbase.cpp index 2c517b58f8..1631176477 100644 --- a/src/chainparamsbase.cpp +++ b/src/chainparamsbase.cpp @@ -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)); } |