[pan2: 1/8] small fix to download meter



commit faa7b44922777311c876b72cfcfd383bad96402a
Author: Heinrich MÃller <henmull src gnome org>
Date:   Wed Oct 3 11:07:17 2012 +0200

    small fix to download meter

 pan/data-impl/download-meter.cc |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/pan/data-impl/download-meter.cc b/pan/data-impl/download-meter.cc
index 808f23e..04ef3da 100644
--- a/pan/data-impl/download-meter.cc
+++ b/pan/data-impl/download-meter.cc
@@ -99,11 +99,11 @@ namespace
   {
     int cnt (log10f(bytes)/log10f(1024));
     uint64_t factor = ::pow(1024ul, (uint64_t)cnt);
-    float rest = cnt > 0.0f ? (((float)bytes / (float)factor)/10.0f) : 0.0f;
+    double rest = cnt > 0.0f ? (((double)bytes / (double)factor)/10.0f) : 0.0f;
     std::stringstream str;
 
     uint64_t ret = factor == 0ul ? ret : bytes / factor;
-    str << std::setprecision (2) << (ret+rest) << " " << mnemonic(cnt);
+    str << (ret+rest) << " " << mnemonic(cnt);
     return str.str();
   }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]