diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2012-10-29 22:39:09 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2012-10-29 22:39:09 +0900 |
| commit | 8566d050ff69fb0493cce6d8534ee57a8bdf86df (patch) | |
| tree | 16357e271e9f3d148f009704b4f8d369eccc7f51 /src/ConsoleStatCalc.cc | |
| parent | d6f73292fa5d5040981e6ecf354a7f638b81fc47 (diff) | |
Reset stream format state
Diffstat (limited to 'src/ConsoleStatCalc.cc')
| -rw-r--r-- | src/ConsoleStatCalc.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ConsoleStatCalc.cc b/src/ConsoleStatCalc.cc index 82842c09..6f373527 100644 --- a/src/ConsoleStatCalc.cc +++ b/src/ConsoleStatCalc.cc @@ -115,8 +115,11 @@ void printProgress rg->downloadFinished()) { o << "SEEDING" << "(" << "ratio:"; if(rg->getCompletedLength() > 0) { + std::streamsize oldprec = o.precision(); o << std::fixed << std::setprecision(1) - << ((stat.allTimeUploadLength*10)/rg->getCompletedLength())/10.0; + << ((stat.allTimeUploadLength*10)/rg->getCompletedLength())/10.0 + << std::setprecision(oldprec) + << std::resetiosflags(std::ios::fixed); } else { o << "--"; } |
