瀏覽代碼

2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

	Set precision to 2 because share ratio is rounded into 1.0 if 
precision
	set to 1.
	* src/ConsoleStatCalc.cc (calculateStat)
Tatsuhiro Tsujikawa 18 年之前
父節點
當前提交
1fed0c0cb0
共有 3 個文件被更改,包括 7 次插入2 次删除
  1. 6 0
      ChangeLog
  2. 0 1
      TODO
  3. 1 1
      src/ConsoleStatCalc.cc

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+2007-11-22  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
+
+	Set precision to 2 because share ratio is rounded into 1.0 if precision
+	set to 1.
+	* src/ConsoleStatCalc.cc (calculateStat)
+
 2007-11-20  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
 	Preallocate non-requested file which is adjacent forward to requested

+ 0 - 1
TODO

@@ -57,4 +57,3 @@
 -- remaining issues to be implemented for 0.12.0 release
 * Update translation
 * replace strtol with Util::parseInt
-* precision of share ratio

+ 1 - 1
src/ConsoleStatCalc.cc

@@ -71,7 +71,7 @@ ConsoleStatCalc::calculateStat(const RequestGroupManHandle& requestGroupMan,
     if(firstRequestGroup->downloadFinished() &&
        !BtContextHandle(firstRequestGroup->getDownloadContext()).isNull()) {
       cout << "SEEDING" << "(" << "ratio:"
-	   << fixed << setprecision(1) << stat.getAllTimeUploadLength()*1.0/firstRequestGroup->getCompletedLength()
+	   << fixed << setprecision(2) << stat.getAllTimeUploadLength()*1.0/firstRequestGroup->getCompletedLength()
 	   << ")";
     } else
 #endif // ENABLE_BITTORRENT