Initialized scalar members

pull/31/head
Tatsuhiro Tsujikawa 2012-10-29 23:09:16 +09:00
parent feb548e174
commit 2676bbe9c6
11 changed files with 22 additions and 8 deletions

View File

@ -59,6 +59,7 @@ enum {
BencodeParser::BencodeParser(StructParserStateMachine* psm)
: psm_(psm),
currentState_(BENCODE_INITIAL),
strLength_(0),
numberSign_(1),
number_(0),
numConsumed_(0),

View File

@ -57,7 +57,8 @@
namespace aria2 {
CookieStorage::DomainEntry::DomainEntry(const std::string& domain)
: key_(util::isNumericHost(domain)?domain:cookie::reverseDomainLevel(domain))
: key_(util::isNumericHost(domain)?domain:cookie::reverseDomainLevel(domain)),
lastAccessTime_(0)
{}
CookieStorage::DomainEntry::DomainEntry

View File

@ -79,7 +79,8 @@ namespace aria2 {
DefaultBtInteractive::DefaultBtInteractive
(const SharedHandle<DownloadContext>& downloadContext,
const SharedHandle<Peer>& peer)
: downloadContext_(downloadContext),
: cuid_(0),
downloadContext_(downloadContext),
peer_(peer),
metadataGetMode_(false),
localNode_(0),

View File

@ -67,7 +67,10 @@ DefaultExtensionMessageFactory::DefaultExtensionMessageFactory
(const SharedHandle<Peer>& peer,
const SharedHandle<ExtensionMessageRegistry>& registry)
: peer_(peer),
registry_(registry)
registry_(registry),
messageFactory_(0),
dispatcher_(0),
tracker_(0)
{}
DefaultExtensionMessageFactory::~DefaultExtensionMessageFactory() {}

View File

@ -95,7 +95,8 @@ DownloadEngine::DownloadEngine(const SharedHandle<EventPoll>& eventPoll)
#ifdef HAVE_ARES_ADDR_NODE
asyncDNSServers_(0),
#endif // HAVE_ARES_ADDR_NODE
dnsCache_(new DNSCache())
dnsCache_(new DNSCache()),
option_(0)
{
unsigned char sessionId[20];
util::generateRandomKey(sessionId);

View File

@ -76,7 +76,8 @@ HttpConnection::HttpConnection
: cuid_(cuid),
socket_(socket),
socketRecvBuffer_(socketRecvBuffer),
socketBuffer_(socket)
socketBuffer_(socket),
option_(0)
{}
HttpConnection::~HttpConnection() {}

View File

@ -41,7 +41,10 @@
namespace aria2 {
HttpHeader::HttpHeader() {}
HttpHeader::HttpHeader()
: statusCode_(0)
{}
HttpHeader::~HttpHeader() {}
void HttpHeader::put(int hdKey, const std::string& value)

View File

@ -60,6 +60,7 @@ const std::string HttpRequest::USER_AGENT("aria2");
HttpRequest::HttpRequest():contentEncodingEnabled_(true),
userAgent_(USER_AGENT),
acceptMetalink_(false),
option_(0),
noCache_(true),
acceptGzip_(false),
endOffsetOverride_(0)

View File

@ -71,7 +71,8 @@ HttpServer::HttpServer
reqType_(RPC_TYPE_NONE),
keepAlive_(true),
gzip_(false),
acceptsGZip_(false)
acceptsGZip_(false),
secure_(false)
{}
HttpServer::~HttpServer() {}

View File

@ -54,7 +54,7 @@ RpcRequest::RpcRequest(const std::string& methodName,
{}
RpcRequest::RpcRequest(const RpcRequest& c)
: methodName(c.methodName), params(c.params), id(c.id)
: methodName(c.methodName), params(c.params), id(c.id), jsonRpc(c.jsonRpc)
{}
RpcRequest::~RpcRequest() {}

View File

@ -55,6 +55,7 @@ namespace aria2 {
UTMetadataDataExtensionMessage::UTMetadataDataExtensionMessage
(uint8_t extensionMessageID)
: UTMetadataExtensionMessage(extensionMessageID),
totalSize_(0),
tracker_(0)
{}