Perform member initialization in initialization lists where possible
This commit is contained in:
parent
f259263a7b
commit
656dbd871a
4 changed files with 4 additions and 14 deletions
|
@ -129,10 +129,7 @@ struct CBlockLocator
|
||||||
|
|
||||||
CBlockLocator() {}
|
CBlockLocator() {}
|
||||||
|
|
||||||
CBlockLocator(const std::vector<uint256>& vHaveIn)
|
CBlockLocator(const std::vector<uint256>& vHaveIn) : vHave(vHaveIn) {}
|
||||||
{
|
|
||||||
vHave = vHaveIn;
|
|
||||||
}
|
|
||||||
|
|
||||||
ADD_SERIALIZE_METHODS;
|
ADD_SERIALIZE_METHODS;
|
||||||
|
|
||||||
|
|
|
@ -151,11 +151,7 @@ CInv::CInv()
|
||||||
hash.SetNull();
|
hash.SetNull();
|
||||||
}
|
}
|
||||||
|
|
||||||
CInv::CInv(int typeIn, const uint256& hashIn)
|
CInv::CInv(int typeIn, const uint256& hashIn) : type(typeIn), hash(hashIn) {}
|
||||||
{
|
|
||||||
type = typeIn;
|
|
||||||
hash = hashIn;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool operator<(const CInv& a, const CInv& b)
|
bool operator<(const CInv& a, const CInv& b)
|
||||||
{
|
{
|
||||||
|
|
|
@ -50,7 +50,7 @@ public:
|
||||||
std::string URI;
|
std::string URI;
|
||||||
std::string authUser;
|
std::string authUser;
|
||||||
|
|
||||||
JSONRPCRequest() { id = NullUniValue; params = NullUniValue; fHelp = false; }
|
JSONRPCRequest() : id(NullUniValue), params(NullUniValue), fHelp(false) {}
|
||||||
void parse(const UniValue& valRequest);
|
void parse(const UniValue& valRequest);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -136,10 +136,7 @@ public:
|
||||||
std::string name;
|
std::string name;
|
||||||
std::string purpose;
|
std::string purpose;
|
||||||
|
|
||||||
CAddressBookData()
|
CAddressBookData() : purpose("unknown") {}
|
||||||
{
|
|
||||||
purpose = "unknown";
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef std::map<std::string, std::string> StringMap;
|
typedef std::map<std::string, std::string> StringMap;
|
||||||
StringMap destdata;
|
StringMap destdata;
|
||||||
|
|
Loading…
Reference in a new issue