aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2019-01-05 12:02:12 +0100
committerMarcoFalke <falke.marco@gmail.com>2019-01-05 16:16:37 +0100
commitfa2510d5c1cdf9c2cd5cc9887302ced4378c7202 (patch)
tree616492efb0b268d8e37ba57bda813aaacc66c975 /src/net.h
parentf7e182a973ed66b4c11dc6239e57016655503b4c (diff)
downloadbitcoin-fa2510d5c1cdf9c2cd5cc9887302ced4378c7202.tar.xz
Use C++11 default member initializers
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/net.h b/src/net.h
index 915a8e5b35..b8d46017fe 100644
--- a/src/net.h
+++ b/src/net.h
@@ -404,15 +404,15 @@ private:
// whitelisted (as well as those connecting to whitelisted binds).
std::vector<CSubNet> vWhitelistedRange;
- unsigned int nSendBufferMaxSize;
- unsigned int nReceiveFloodSize;
+ unsigned int nSendBufferMaxSize{0};
+ unsigned int nReceiveFloodSize{0};
std::vector<ListenSocket> vhListenSocket;
- std::atomic<bool> fNetworkActive;
+ std::atomic<bool> fNetworkActive{true};
banmap_t setBanned GUARDED_BY(cs_setBanned);
CCriticalSection cs_setBanned;
- bool setBannedIsDirty GUARDED_BY(cs_setBanned);
- bool fAddressesInitialized;
+ bool setBannedIsDirty GUARDED_BY(cs_setBanned){false};
+ bool fAddressesInitialized{false};
CAddrMan addrman;
std::deque<std::string> vOneShots GUARDED_BY(cs_vOneShots);
CCriticalSection cs_vOneShots;
@@ -421,8 +421,8 @@ private:
std::vector<CNode*> vNodes;
std::list<CNode*> vNodesDisconnected;
mutable CCriticalSection cs_vNodes;
- std::atomic<NodeId> nLastNodeId;
- unsigned int nPrevNodeCount;
+ std::atomic<NodeId> nLastNodeId{0};
+ unsigned int nPrevNodeCount{0};
/** Services this instance offers */
ServiceFlags nLocalServices;
@@ -446,7 +446,7 @@ private:
std::condition_variable condMsgProc;
Mutex mutexMsgProc;
- std::atomic<bool> flagInterruptMsgProc;
+ std::atomic<bool> flagInterruptMsgProc{false};
CThreadInterrupt interruptNet;