diff options
| author | Pieter Wuille <[email protected]> | 2017-06-06 16:40:48 -0700 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2017-06-06 17:00:19 -0700 |
| commit | be3e042c20e2f3449b7b55d1cab0a80b0c6f00af (patch) | |
| tree | 625ebebf787ed1a54bc8014bab3dfcdca407b342 /src | |
| parent | Merge #10331: Share config between util and functional tests (diff) | |
| parent | Perform member initialization in initialization lists where possible (diff) | |
| download | discoin-be3e042c20e2f3449b7b55d1cab0a80b0c6f00af.tar.xz discoin-be3e042c20e2f3449b7b55d1cab0a80b0c6f00af.zip | |
Merge #10523: Perform member initialization in initialization lists where possible
656dbd871 Perform member initialization in initialization lists where possible (practicalswift)
Tree-SHA512: 048380f4da23ab1eaaf471801a01dbd76f2235afb686c1489b30a6bac109195134afc83414b8378d3482a9042d537ec62d30136dadb9347cf06b07fb5c693208
Diffstat (limited to 'src')
| -rw-r--r-- | src/primitives/block.h | 5 | ||||
| -rw-r--r-- | src/protocol.cpp | 6 | ||||
| -rw-r--r-- | src/rpc/server.h | 2 | ||||
| -rw-r--r-- | src/wallet/wallet.h | 5 |
4 files changed, 4 insertions, 14 deletions
diff --git a/src/primitives/block.h b/src/primitives/block.h index 4c6eb20ad..f03cf4850 100644 --- a/src/primitives/block.h +++ b/src/primitives/block.h @@ -129,10 +129,7 @@ struct CBlockLocator CBlockLocator() {} - CBlockLocator(const std::vector<uint256>& vHaveIn) - { - vHave = vHaveIn; - } + CBlockLocator(const std::vector<uint256>& vHaveIn) : vHave(vHaveIn) {} ADD_SERIALIZE_METHODS; diff --git a/src/protocol.cpp b/src/protocol.cpp index 28d1d0eeb..6cd246ed5 100644 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -151,11 +151,7 @@ CInv::CInv() hash.SetNull(); } -CInv::CInv(int typeIn, const uint256& hashIn) -{ - type = typeIn; - hash = hashIn; -} +CInv::CInv(int typeIn, const uint256& hashIn) : type(typeIn), hash(hashIn) {} bool operator<(const CInv& a, const CInv& b) { diff --git a/src/rpc/server.h b/src/rpc/server.h index 1e984cbc0..a893f4903 100644 --- a/src/rpc/server.h +++ b/src/rpc/server.h @@ -50,7 +50,7 @@ public: std::string URI; std::string authUser; - JSONRPCRequest() { id = NullUniValue; params = NullUniValue; fHelp = false; } + JSONRPCRequest() : id(NullUniValue), params(NullUniValue), fHelp(false) {} void parse(const UniValue& valRequest); }; diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index a3974bf00..8276b29a5 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -136,10 +136,7 @@ public: std::string name; std::string purpose; - CAddressBookData() - { - purpose = "unknown"; - } + CAddressBookData() : purpose("unknown") {} typedef std::map<std::string, std::string> StringMap; StringMap destdata; |