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/node | |
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/node')
-rw-r--r-- | src/node/interfaces.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/node/interfaces.cpp b/src/node/interfaces.cpp index 62ef72ef38..8611989d01 100644 --- a/src/node/interfaces.cpp +++ b/src/node/interfaces.cpp @@ -613,7 +613,7 @@ public: } std::unique_ptr<Handler> handleNotifications(std::shared_ptr<Notifications> notifications) override { - return MakeUnique<NotificationsHandlerImpl>(std::move(notifications)); + return std::make_unique<NotificationsHandlerImpl>(std::move(notifications)); } void waitForNotificationsIfTipChanged(const uint256& old_tip) override { @@ -626,7 +626,7 @@ public: } std::unique_ptr<Handler> handleRpc(const CRPCCommand& command) override { - return MakeUnique<RpcHandlerImpl>(command); + return std::make_unique<RpcHandlerImpl>(command); } bool rpcEnableDeprecated(const std::string& method) override { return IsDeprecatedRPCEnabled(method); } void rpcRunLater(const std::string& name, std::function<void()> fn, int64_t seconds) override @@ -669,6 +669,6 @@ public: } // namespace node namespace interfaces { -std::unique_ptr<Node> MakeNode(NodeContext* context) { return MakeUnique<node::NodeImpl>(context); } -std::unique_ptr<Chain> MakeChain(NodeContext& context) { return MakeUnique<node::ChainImpl>(context); } +std::unique_ptr<Node> MakeNode(NodeContext* context) { return std::make_unique<node::NodeImpl>(context); } +std::unique_ptr<Chain> MakeChain(NodeContext& context) { return std::make_unique<node::ChainImpl>(context); } } // namespace interfaces |