浏览代码

Initialized member variables of DownloadResult in its ctor.

Tatsuhiro Tsujikawa 14 年之前
父节点
当前提交
ba9673be1d
共有 1 个文件被更改,包括 13 次插入1 次删除
  1. 13 1
      src/DownloadResult.cc

+ 13 - 1
src/DownloadResult.cc

@@ -39,7 +39,19 @@
 
 namespace aria2 {
 
-DownloadResult::DownloadResult() {}
+DownloadResult::DownloadResult()
+  : gid(0),
+    inMemoryDownload(false),
+    sessionDownloadLength(0),
+    sessionTime(0),
+    result(error_code::UNDEFINED),
+    belongsTo(0),
+    totalLength(0),
+    completedLength(0),
+    uploadLength(0),
+    pieceLength(0),
+    numPieces(0)
+{}
 
 DownloadResult::~DownloadResult() {}