diff options
| author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-02-02 15:12:22 +0000 |
|---|---|---|
| committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-02-02 15:15:21 +0000 |
| commit | bece67f9e82b839b03f40634614f73a61034a658 (patch) | |
| tree | 4d16931454791281b04247e17a35f5f766c7376f | |
| parent | 1aabd14c21221702b7efd84dfe43d17f6486db83 (diff) | |
| download | monzero-core-bece67f9e82b839b03f40634614f73a61034a658.tar.gz monzero-core-bece67f9e82b839b03f40634614f73a61034a658.tar.xz monzero-core-bece67f9e82b839b03f40634614f73a61034a658.zip | |
miner: restore std::cout precision after modification
Coverity 136462
| -rw-r--r-- | src/cryptonote_basic/miner.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cryptonote_basic/miner.cpp b/src/cryptonote_basic/miner.cpp index 6c4ecf58c..b322383a9 100644 --- a/src/cryptonote_basic/miner.cpp +++ b/src/cryptonote_basic/miner.cpp @@ -198,7 +198,8 @@ namespace cryptonote { uint64_t total_hr = std::accumulate(m_last_hash_rates.begin(), m_last_hash_rates.end(), 0); float hr = static_cast<float>(total_hr)/static_cast<float>(m_last_hash_rates.size()); - std::cout << "hashrate: " << std::setprecision(4) << std::fixed << hr << ENDL; + const auto precision = std::cout.precision(); + std::cout << "hashrate: " << std::setprecision(4) << std::fixed << hr << precision << ENDL; } } m_last_hr_merge_time = misc_utils::get_tick_count(); |
