[Cppunit-cvs] cppunit/include/cppunit/portability Stream.h,1.4,1.5
Brought to you by:
blep
From: Baptiste L. <bl...@us...> - 2005-10-13 21:34:47
|
Update of /cvsroot/cppunit/cppunit/include/cppunit/portability In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1628/include/cppunit/portability Modified Files: Stream.h Log Message: * better float & double string conversion Index: Stream.h =================================================================== RCS file: /cvsroot/cppunit/cppunit/include/cppunit/portability/Stream.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Stream.h 8 Nov 2004 20:14:35 -0000 1.4 --- Stream.h 13 Oct 2005 21:34:38 -0000 1.5 *************** *** 93,96 **** --- 93,97 ---- virtual ~OStream() { + flush(); } *************** *** 170,174 **** { char buffer[128]; ! sprintf( buffer, "%f", double(v) ); return write( buffer ); } --- 171,175 ---- { char buffer[128]; ! sprintf( buffer, "%.16g", double(v) ); return write( buffer ); } *************** *** 177,181 **** { char buffer[128]; ! sprintf( buffer, "%f", v ); return write( buffer ); } --- 178,182 ---- { char buffer[128]; ! sprintf( buffer, "%.16g", v ); return write( buffer ); } *************** *** 184,188 **** { char buffer[128]; ! sprintf( buffer, "%f", double(v) ); return write( buffer ); } --- 185,189 ---- { char buffer[128]; ! sprintf( buffer, "%.16g", double(v) ); return write( buffer ); } |