From: Philippe E. <ph...@us...> - 2003-09-18 13:33:22
|
Update of /cvsroot/oprofile/oprofile/libutil++ In directory sc8-pr-cvs1:/tmp/cvs-serv24465/libutil++ Modified Files: string_manip.cpp Log Message: shift output to right by two char not one for detailed output, use 9 instead of 12 for % field. Shrink output of "100.0000" to "100.000" Index: string_manip.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/libutil++/string_manip.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -u -p -d -r1.25 -r1.26 --- string_manip.cpp 14 Sep 2003 04:19:23 -0000 1.25 +++ string_manip.cpp 18 Sep 2003 13:33:11 -0000 1.26 @@ -140,7 +140,10 @@ string const format_double(double value, << setprecision(fract_width - 3) << value; } - return os.str(); + string formatted = os.str(); + if (is_prefix(formatted, "100.")) + formatted.erase(formatted.size() -1); + return formatted; } template <> |