Merge pull request #4523

6ca00b6d miner: really reset flags/precision on std::cout (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2018-10-20 20:40:36 +02:00
commit a145ae52b6
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD
1 changed files with 1 additions and 1 deletions

View File

@ -201,7 +201,7 @@ namespace cryptonote
float hr = static_cast<float>(total_hr)/static_cast<float>(m_last_hash_rates.size()); float hr = static_cast<float>(total_hr)/static_cast<float>(m_last_hash_rates.size());
const auto flags = std::cout.flags(); const auto flags = std::cout.flags();
const auto precision = std::cout.precision(); const auto precision = std::cout.precision();
std::cout << "hashrate: " << std::setprecision(4) << std::fixed << hr << flags << precision << ENDL; std::cout << "hashrate: " << std::setprecision(4) << std::fixed << hr << std::setiosflags(flags) << std::setprecision(precision) << ENDL;
} }
} }
m_last_hr_merge_time = misc_utils::get_tick_count(); m_last_hr_merge_time = misc_utils::get_tick_count();