Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=fwsetup-ng.git;a=commitdiff;h=26f81cdc2b454ef8acc15e50e64a56bc2bbcf749
commit 26f81cdc2b454ef8acc15e50e64a56bc2bbcf749 Author: James Buren <[email protected]> Date: Tue Aug 28 00:29:36 2012 -0500 when converting size to string, use fixed width notation. diff --git a/Utility.cc b/Utility.cc index 62cd55a..7141d2a 100644 --- a/Utility.cc +++ b/Utility.cc @@ -12,6 +12,7 @@ using std::stringstream; using std::ios; using std::endl; +using std::fixed; ofstream logfile(LOGFILE,ios::app); @@ -141,7 +142,9 @@ string sizeToString(unsigned long long n) suffix = "BiB"; } - buf << (long double) n / divisor << suffix; + buf.precision(1); + + buf << fixed << (long double) n / divisor << suffix; return buf.str(); } _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
