Browse Source

Merge #10523: Perform member initialization in initialization lists where possible

656dbd871 Perform member initialization in initialization lists where possible (practicalswift)

Tree-SHA512: 048380f4da23ab1eaaf471801a01dbd76f2235afb686c1489b30a6bac109195134afc83414b8378d3482a9042d537ec62d30136dadb9347cf06b07fb5c693208
0.15
Pieter Wuille 8 years ago
parent
commit
be3e042c20
No known key found for this signature in database
GPG Key ID: A636E97631F767E0
  1. 5
      src/primitives/block.h
  2. 6
      src/protocol.cpp
  3. 2
      src/rpc/server.h
  4. 5
      src/wallet/wallet.h

5
src/primitives/block.h

@ -129,10 +129,7 @@ struct CBlockLocator @@ -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;

6
src/protocol.cpp

@ -151,11 +151,7 @@ CInv::CInv() @@ -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)
{

2
src/rpc/server.h

@ -50,7 +50,7 @@ public: @@ -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);
};

5
src/wallet/wallet.h

@ -136,10 +136,7 @@ public: @@ -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;

Loading…
Cancel
Save