CID 1505940: Not restoring ostream format Remove ostream_guard, add call to resetiosflags(), store precision value before changing it and restore it afterwards.
Closes #4472 --- tester/covoar/ReportsText.cc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tester/covoar/ReportsText.cc b/tester/covoar/ReportsText.cc index c4a5dbc..b76a8ae 100644 --- a/tester/covoar/ReportsText.cc +++ b/tester/covoar/ReportsText.cc @@ -10,10 +10,6 @@ #include "Explanations.h" #include "ObjdumpProcessor.h" -#include <rtems-utils.h> - -typedef rtems::utils::ostream_guard ostream_guard; - namespace Coverage { ReportsText::ReportsText( time_t timestamp, const std::string& symbolSetName ): @@ -148,8 +144,6 @@ bool ReportsText::PutCoverageLine( { const Coverage::Explanation* explanation; - ostream_guard oldState( report ); - report << "============================================" << std::endl << "Index : " << range.id << std::endl << "Symbol : " << symbolName @@ -238,6 +232,8 @@ bool ReportsText::PutSymbolSummaryLine( symbolInfo.stats.sizeInBytes; } + std::streamsize ss = report.precision(); + report << "============================================" << std::endl << "Symbol : " << symbolName << std::endl @@ -257,7 +253,9 @@ bool ReportsText::PutSymbolSummaryLine( << "Percentage Uncovered Instructions : " << uncoveredInstructions << std::endl << "Percentage Uncovered Bytes : " - << uncoveredBytes << std::endl; + << uncoveredBytes << std::endl + << std::resetiosflags( std::ios_base::fixed ) + << std::setprecision( ss ); report << "============================================" << std::endl; } -- 1.8.3.1 _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel