mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-11 15:19:19 +02: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:
12
src/net.cpp
12
src/net.cpp
@@ -2466,11 +2466,11 @@ bool CConnman::Start(CScheduler& scheduler, const Options& connOptions)
|
||||
|
||||
if (semOutbound == nullptr) {
|
||||
// initialize semaphore
|
||||
semOutbound = MakeUnique<CSemaphore>(std::min(m_max_outbound, nMaxConnections));
|
||||
semOutbound = std::make_unique<CSemaphore>(std::min(m_max_outbound, nMaxConnections));
|
||||
}
|
||||
if (semAddnode == nullptr) {
|
||||
// initialize semaphore
|
||||
semAddnode = MakeUnique<CSemaphore>(nMaxAddnode);
|
||||
semAddnode = std::make_unique<CSemaphore>(nMaxAddnode);
|
||||
}
|
||||
|
||||
//
|
||||
@@ -2906,11 +2906,11 @@ CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, SOCKET hSocketIn, const
|
||||
hSocket = hSocketIn;
|
||||
addrName = addrNameIn == "" ? addr.ToStringIPPort() : addrNameIn;
|
||||
if (conn_type_in != ConnectionType::BLOCK_RELAY) {
|
||||
m_tx_relay = MakeUnique<TxRelay>();
|
||||
m_tx_relay = std::make_unique<TxRelay>();
|
||||
}
|
||||
|
||||
if (RelayAddrsWithConn()) {
|
||||
m_addr_known = MakeUnique<CRollingBloomFilter>(5000, 0.001);
|
||||
m_addr_known = std::make_unique<CRollingBloomFilter>(5000, 0.001);
|
||||
}
|
||||
|
||||
for (const std::string &msg : getAllNetMessageTypes())
|
||||
@@ -2923,8 +2923,8 @@ CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, SOCKET hSocketIn, const
|
||||
LogPrint(BCLog::NET, "Added connection peer=%d\n", id);
|
||||
}
|
||||
|
||||
m_deserializer = MakeUnique<V1TransportDeserializer>(V1TransportDeserializer(Params(), GetId(), SER_NETWORK, INIT_PROTO_VERSION));
|
||||
m_serializer = MakeUnique<V1TransportSerializer>(V1TransportSerializer());
|
||||
m_deserializer = std::make_unique<V1TransportDeserializer>(V1TransportDeserializer(Params(), GetId(), SER_NETWORK, INIT_PROTO_VERSION));
|
||||
m_serializer = std::make_unique<V1TransportSerializer>(V1TransportSerializer());
|
||||
}
|
||||
|
||||
CNode::~CNode()
|
||||
|
||||
Reference in New Issue
Block a user