aboutsummaryrefslogtreecommitdiff
path: root/src/protocol.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2020-05-21 17:35:05 +0200
committerWladimir J. van der Laan <[email protected]>2020-05-21 17:44:03 +0200
commitfed1a9043fdf802c7cf7eab1c8aab25ca1c90e8d (patch)
tree0e30acb8e24d0017242f4649f6e8b490b0616267 /src/protocol.cpp
parentMerge #19023: test: Fix intermittent ETIMEDOUT on FreeBSD (diff)
parentnet: Use C++11 member initialization in protocol (diff)
downloaddiscoin-fed1a9043fdf802c7cf7eab1c8aab25ca1c90e8d.tar.xz
discoin-fed1a9043fdf802c7cf7eab1c8aab25ca1c90e8d.zip
Merge #19020: net: Use C++11 member initialization in protocol
fa8bbb1368be0f3fd9cc4446aead3f4c2188a4ab net: Use C++11 member initialization in protocol (MarcoFalke) Pull request description: This change removes `Init` from the constructors and instead uses C++11 member initialization. This removes a bunch of boilerplate, makes the code easier to read. Also, C++11 member initialization avoids accidental uninitialized members. ACKs for top commit: laanwj: ACK fa8bbb1368be0f3fd9cc4446aead3f4c2188a4ab Tree-SHA512: f89f6c2fe1bbfccd92acd72c0129d43e464339ed17e95384a81ed33a1a4257dba7ecc1534c6fc8c4668f0d9ade7ba0807b57066c6c763c1b72f74fc51f40907a
Diffstat (limited to 'src/protocol.cpp')
-rw-r--r--src/protocol.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/protocol.cpp b/src/protocol.cpp
index 25851e786..e929cff11 100644
--- a/src/protocol.cpp
+++ b/src/protocol.cpp
@@ -147,24 +147,6 @@ void SetServiceFlagsIBDCache(bool state) {
g_initial_block_download_completed = state;
}
-
-CAddress::CAddress() : CService()
-{
- Init();
-}
-
-CAddress::CAddress(CService ipIn, ServiceFlags nServicesIn) : CService(ipIn)
-{
- Init();
- nServices = nServicesIn;
-}
-
-void CAddress::Init()
-{
- nServices = NODE_NONE;
- nTime = 100000000;
-}
-
CInv::CInv()
{
type = 0;