diff --git a/src/primitives/block.h b/src/primitives/block.h index dda9a9d609..4ec1cf75ca 100644 --- a/src/primitives/block.h +++ b/src/primitives/block.h @@ -130,10 +130,7 @@ struct CBlockLocator CBlockLocator() {} - CBlockLocator(const std::vector& vHaveIn) - { - vHave = vHaveIn; - } + CBlockLocator(const std::vector& vHaveIn) : vHave(vHaveIn) {} ADD_SERIALIZE_METHODS; diff --git a/src/protocol.cpp b/src/protocol.cpp index 48146ee8f9..3449b54f80 100644 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -257,11 +257,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) {} CInv::CInv(const std::string& strType, const uint256& hashIn) { diff --git a/src/rpc/server.h b/src/rpc/server.h index 98e2bddbe5..de3b74ead2 100644 --- a/src/rpc/server.h +++ b/src/rpc/server.h @@ -48,7 +48,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 0dc655672a..7eb94c2cdc 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -159,10 +159,7 @@ public: std::string name; std::string purpose; - CAddressBookData() - { - purpose = "unknown"; - } + CAddressBookData() : purpose("unknown") {} typedef std::map StringMap; StringMap destdata;