Skip to content

Commit

Permalink
miner: restore stream flags after changing them
Browse files Browse the repository at this point in the history
Coverity 136462
  • Loading branch information
moneromooo-monero committed Sep 27, 2018
1 parent a093092 commit 3ebd05d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cryptonote_basic/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,9 @@ 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());
const auto flags = std::cout.flags();
const auto precision = std::cout.precision();
std::cout << "hashrate: " << std::setprecision(4) << std::fixed << hr << precision << ENDL;
std::cout << "hashrate: " << std::setprecision(4) << std::fixed << hr << flags << precision << ENDL;
}
}
m_last_hr_merge_time = misc_utils::get_tick_count();
Expand Down

0 comments on commit 3ebd05d

Please sign in to comment.